From 5c5d56f084cca526c0237e33a487074849d56692 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 19 May 2021 15:14:21 +0200 Subject: [PATCH 1/4] python3Packages.coqpit: init at 0.0.6.6 --- .../python-modules/coqpit/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/coqpit/default.nix diff --git a/pkgs/development/python-modules/coqpit/default.nix b/pkgs/development/python-modules/coqpit/default.nix new file mode 100644 index 00000000000..c4df114e24d --- /dev/null +++ b/pkgs/development/python-modules/coqpit/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "coqpit"; + version = "0.0.6.6"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "coqui-ai"; + repo = pname; + rev = "v${version}"; + sha256 = "0wb5wf84i5h4ycm732kn4316v7schhm91s2rrklfw9sny5dqmdnh"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "coqpit" + "coqpit.coqpit" + ]; + + meta = with lib; { + description = "Simple but maybe too simple config management through python data classes"; + longDescription = '' + Simple, light-weight and no dependency config handling through python data classes with to/from JSON serialization/deserialization. + ''; + homepage = "https://github.com/coqui-ai/coqpit"; + license = licenses.mit; + maintainers = with maintainers; [ hexa mic92 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 58a6d6e49f9..f331e80124b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1283,6 +1283,8 @@ in { connect-box = callPackage ../development/python-modules/connect_box { }; + coqpit = callPackage ../development/python-modules/coqpit { }; + cerberus = callPackage ../development/python-modules/cerberus { }; cert-chain-resolver = callPackage ../development/python-modules/cert-chain-resolver { }; From 66da2a69b424f46affab5b81967c00120de8f92e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 19 May 2021 15:14:29 +0200 Subject: [PATCH 2/4] tts: 0.0.13 -> 0.0.14 https://github.com/coqui-ai/TTS/releases/tag/v0.0.14 --- pkgs/tools/audio/tts/default.nix | 33 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/audio/tts/default.nix b/pkgs/tools/audio/tts/default.nix index c70b907c792..51976a2d6a1 100644 --- a/pkgs/tools/audio/tts/default.nix +++ b/pkgs/tools/audio/tts/default.nix @@ -12,25 +12,26 @@ # # If you upgrade from an old version you may have to delete old models from ~/.local/share/tts # Also note that your tts version might not support all available models so check: -# https://github.com/coqui-ai/TTS/releases/tag/v0.0.13 +# https://github.com/coqui-ai/TTS/releases/tag/v0.0.14 # # For now, for deployment check the systemd unit in the pull request: # https://github.com/NixOS/nixpkgs/pull/103851#issue-521121136 python3Packages.buildPythonApplication rec { pname = "tts"; - version = "0.0.13"; + version = "0.0.14"; src = fetchFromGitHub { owner = "coqui-ai"; repo = "TTS"; rev = "v${version}"; - sha256 = "1sh7sjkh7ihbkqc7sl4hnzci0n7gv4s140dykpb1havaqyfhjn8l"; + sha256 = "0cl0ri90mx0y19fmqww73lp5nv6qkpc45rm4157i7p6q6llajdhp"; }; - preBuild = '' + postPatch = '' sed -i -e 's!librosa==[^"]*!librosa!' requirements.txt sed -i -e 's!unidecode==[^"]*!unidecode!' requirements.txt + sed -i -e 's!numba==[^"]*!numba!' requirements.txt sed -i -e 's!numpy==[^"]*!numpy!' requirements.txt sed -i -e 's!umap-learn==[^"]*!umap-learn!' requirements.txt ''; @@ -40,14 +41,15 @@ python3Packages.buildPythonApplication rec { ]; propagatedBuildInputs = with python3Packages; [ + coqpit flask gdown inflect jieba librosa matplotlib + numba pandas - phonemizer pypinyin pysbd pytorch @@ -69,6 +71,7 @@ python3Packages.buildPythonApplication rec { ''; checkInputs = with python3Packages; [ + pytest-sugar pytestCheckHook ]; @@ -77,10 +80,6 @@ python3Packages.buildPythonApplication rec { "test_torch_stft" "test_stft_loss" "test_multiscale_stft_loss" - # assert tensor(1.1904e-07, dtype=torch.float64) <= 0 - "test_parametrized_gan_dataset" - # RuntimeError: expected scalar type Double but found Float - "test_speaker_embedding" # Requires network acccess to download models "test_synthesize" ]; @@ -92,13 +91,25 @@ python3Packages.buildPythonApplication rec { # numba tries to write to HOME directory export HOME=$TMPDIR + + for file in $(grep -rl 'python TTS/bin' tests); do + substituteInPlace "$file" \ + --replace "python TTS/bin" "${python3.interpreter} $out/lib/${python3.libPrefix}/site-packages/TTS/bin" + done ''; disabledTestPaths = [ # requires tensorflow "tests/test_tacotron2_tf_model.py" - "tests/test_vocoder_tf_melgan_generator.py" - "tests/test_vocoder_tf_pqmf.py" + "tests/vocoder_tests/test_vocoder_tf_pqmf.py" + "tests/vocoder_tests/test_vocoder_tf_melgan_generator.py" + # RuntimeError: fft: ATen not compiled with MKL support + "tests/vocoder_tests/test_fullband_melgan_train.py" + "tests/vocoder_tests/test_hifigan_train.py" + "tests/vocoder_tests/test_melgan_train.py" + "tests/vocoder_tests/test_multiband_melgan_train.py" + "tests/vocoder_tests/test_parallel_wavegan_train.py" + ]; meta = with lib; { From 1dce06f8c559a0596803899ca053bbd8e11f50ca Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 19 May 2021 15:17:40 +0200 Subject: [PATCH 3/4] python3Packages.phonemizer: stop maintaining the package --- pkgs/development/python-modules/phonemizer/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/phonemizer/default.nix b/pkgs/development/python-modules/phonemizer/default.nix index 43ce5f1e766..8eab09046dc 100644 --- a/pkgs/development/python-modules/phonemizer/default.nix +++ b/pkgs/development/python-modules/phonemizer/default.nix @@ -65,6 +65,6 @@ buildPythonApplication rec { homepage = "https://github.com/bootphon/phonemizer"; description = "Simple text to phones converter for multiple languages"; license = licenses.gpl3; - maintainers = with maintainers; [ hexa ]; + maintainers = with maintainers; [ ]; }; } From 725b301206eec7caa14eb39bdc542c3a872cbadb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 19 May 2021 15:18:17 +0200 Subject: [PATCH 4/4] python3Packages.segments: stop maintaining the package --- pkgs/development/python-modules/segments/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/segments/default.nix b/pkgs/development/python-modules/segments/default.nix index 00953a8e909..f1c0ad3bf0e 100644 --- a/pkgs/development/python-modules/segments/default.nix +++ b/pkgs/development/python-modules/segments/default.nix @@ -42,6 +42,6 @@ buildPythonPackage rec { description = "Unicode Standard tokenization routines and orthography profile segmentation"; homepage = "https://github.com/cldf/segments"; license = licenses.asl20; - maintainers = with maintainers; [ hexa ]; + maintainers = with maintainers; [ ]; }; }