From 31edf9e922b1b0aaa6d20e3f4da695d30bdddf41 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 16 Nov 2022 17:58:48 +0100 Subject: [PATCH 1/4] python3Packages.jamo: init at 0.4.1 --- .../python-modules/jamo/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/jamo/default.nix diff --git a/pkgs/development/python-modules/jamo/default.nix b/pkgs/development/python-modules/jamo/default.nix new file mode 100644 index 000000000000..e7bebd52db44 --- /dev/null +++ b/pkgs/development/python-modules/jamo/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "jamo"; + version = "0.4.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "JDongian"; + repo = "python-jamo"; + rev = "refs/tags/v${version}"; + hash = "sha256-QHI3Rqf1aQOsW49A/qnIwRnPuerbtyerf+eWIiEvyho="; + }; + + pythonImportsCheck = [ + "jamo" + ]; + + checkInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + changelog = "https://github.com/JDongian/python-jamo/releases/tag/v${version}"; + description = "Hangul syllable decomposition and synthesis using jamo"; + homepage = "https://github.com/JDongian/python-jamo"; + license = licenses.asl20; + maintainers = teams.tts.members; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7abe843bf111..255608823b3f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4653,6 +4653,8 @@ self: super: with self; { jaeger-client = callPackage ../development/python-modules/jaeger-client { }; + jamo = callPackage ../development/python-modules/jamo { }; + janus = callPackage ../development/python-modules/janus { }; jaraco_classes = callPackage ../development/python-modules/jaraco_classes { }; From a050a54ed2369e1d73d748013a13c4e7463cd6d5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 16 Nov 2022 18:27:14 +0100 Subject: [PATCH 2/4] python3Packages.g2pkk: init at 0.1.2 --- .../python-modules/g2pkk/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/g2pkk/default.nix diff --git a/pkgs/development/python-modules/g2pkk/default.nix b/pkgs/development/python-modules/g2pkk/default.nix new file mode 100644 index 000000000000..98e03806d2ff --- /dev/null +++ b/pkgs/development/python-modules/g2pkk/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, jamo +, nltk +}: + +buildPythonPackage rec { + pname = "g2pkk"; + version = "0.1.2"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-YarV1Btn1x3Sm4Vw/JDSyJy3ZJMXAQHZJJJklSG0R+Q="; + }; + + propagatedBuildInputs = [ + jamo + nltk + ]; + + pythonImportsCheck = [ + "g2pkk" + ]; + + doCheck = false; + + meta = with lib; { + description = "Cross-platform g2p for Korean"; + homepage = "https://github.com/harmlessman/g2pkk"; + license = licenses.asl20; + maintainers = teams.tts.members; + }; +} + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 255608823b3f..11993bfa5c9f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3562,6 +3562,8 @@ self: super: with self; { fx2 = callPackage ../development/python-modules/fx2 { }; + g2pkk = callPackage ../development/python-modules/g2pkk { }; + galario = toPythonModule (pkgs.galario.override { enablePython = true; pythonPackages = self; From ad3e05e91069080931ca65d55df1a740be4dfc38 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 16 Nov 2022 18:34:13 +0100 Subject: [PATCH 3/4] python3Packages.trainer: rename from coqui-trainer --- .../python-modules/{coqui-trainer => trainer}/default.nix | 2 +- pkgs/tools/audio/tts/default.nix | 2 +- pkgs/top-level/python-packages.nix | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename pkgs/development/python-modules/{coqui-trainer => trainer}/default.nix (97%) diff --git a/pkgs/development/python-modules/coqui-trainer/default.nix b/pkgs/development/python-modules/trainer/default.nix similarity index 97% rename from pkgs/development/python-modules/coqui-trainer/default.nix rename to pkgs/development/python-modules/trainer/default.nix index 4c77506b9881..627c21ee4bf0 100644 --- a/pkgs/development/python-modules/coqui-trainer/default.nix +++ b/pkgs/development/python-modules/trainer/default.nix @@ -16,7 +16,7 @@ }: let - pname = "coqui-trainer"; + pname = "trainer"; version = "0.0.16"; in buildPythonPackage { diff --git a/pkgs/tools/audio/tts/default.nix b/pkgs/tools/audio/tts/default.nix index 4e9148db9663..36f485d2b9a0 100644 --- a/pkgs/tools/audio/tts/default.nix +++ b/pkgs/tools/audio/tts/default.nix @@ -71,7 +71,6 @@ python.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python.pkgs; [ anyascii coqpit - coqui-trainer flask fsspec gdown @@ -92,6 +91,7 @@ python.pkgs.buildPythonApplication rec { torch-bin torchaudio-bin tqdm + trainer umap-learn unidic-lite webrtcvad diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 11993bfa5c9f..434d8509d39b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1580,8 +1580,6 @@ self: super: with self; { coqpit = callPackage ../development/python-modules/coqpit { }; - coqui-trainer = callPackage ../development/python-modules/coqui-trainer {}; - cepa = callPackage ../development/python-modules/cepa { }; cerberus = callPackage ../development/python-modules/cerberus { }; @@ -11250,6 +11248,8 @@ self: super: with self; { trackpy = callPackage ../development/python-modules/trackpy { }; + trainer = callPackage ../development/python-modules/trainer {}; + traitlets = callPackage ../development/python-modules/traitlets { }; traits = callPackage ../development/python-modules/traits { }; From 6f2d0143991f426d0f77ec7109df175b8974456c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 17 Nov 2022 14:27:35 +0100 Subject: [PATCH 4/4] tts: 0.8.0 -> 0.9.0 https://github.com/coqui-ai/TTS/releases/tag/v0.9.0 --- pkgs/tools/audio/tts/default.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/audio/tts/default.nix b/pkgs/tools/audio/tts/default.nix index 36f485d2b9a0..9b3bce6f44cf 100644 --- a/pkgs/tools/audio/tts/default.nix +++ b/pkgs/tools/audio/tts/default.nix @@ -32,14 +32,14 @@ let in python.pkgs.buildPythonApplication rec { pname = "tts"; - version = "0.8.0"; - format = "setuptools"; + version = "0.9.0"; + format = "pyproject"; src = fetchFromGitHub { owner = "coqui-ai"; repo = "TTS"; rev = "v${version}"; - sha256 = "sha256-A48L1JGXckSEaZra00ZOBVxcYJMvhpQqzE8nABaP0TY="; + sha256 = "sha256-p4I583Rs/4eig7cnOcJjri2ugOLAeF2nvPIvMZrN1Ss="; }; postPatch = let @@ -53,7 +53,6 @@ python.pkgs.buildPythonApplication rec { "numpy" "umap-learn" "unidic-lite" - "pyworld" ]; in '' sed -r -i \ @@ -61,7 +60,6 @@ python.pkgs.buildPythonApplication rec { ''-e 's/${package}.*[<>=]+.*/${package}/g' \'' ) relaxedConstraints)} requirements.txt - sed -i '/tensorboardX/d' requirements.txt ''; nativeBuildInputs = with python.pkgs; [ @@ -73,18 +71,20 @@ python.pkgs.buildPythonApplication rec { coqpit flask fsspec + g2pkk gdown gruut inflect + jamo jieba librosa matplotlib mecab-python3 + nltk numba pandas pypinyin pysbd - pyworld scipy soundfile tensorflow @@ -127,15 +127,17 @@ python.pkgs.buildPythonApplication rec { disabledTests = [ # Requires network acccess to download models - "test_synthesize" + "test_korean_text_to_phonemes" + "test_models_offset_0_step_3" + "test_models_offset_1_step_3" + "test_models_offset_2_step_3" "test_run_all_models" + "test_synthesize" + "test_voice_conversion" # Mismatch between phonemes "test_text_to_ids_phonemes_with_eos_bos_and_blank" # Takes too long "test_parametrized_wavernn_dataset" - - # requires network - "test_voice_conversion" ]; disabledTestPaths = [