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/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/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..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; [ @@ -71,27 +69,29 @@ python.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python.pkgs; [ anyascii coqpit - coqui-trainer flask fsspec + g2pkk gdown gruut inflect + jamo jieba librosa matplotlib mecab-python3 + nltk numba pandas pypinyin pysbd - pyworld scipy soundfile tensorflow torch-bin torchaudio-bin tqdm + trainer umap-learn unidic-lite webrtcvad @@ -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 = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6af64e445511..f72e8f96a538 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 { }; @@ -3564,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; @@ -4655,6 +4655,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 { }; @@ -11250,6 +11252,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 { };