about summary refs log tree commit diff
path: root/pkgs/tools/audio
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2023-01-29 02:36:44 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-01-29 02:36:44 +0100
commitc359c14c32b471d4f964ad062dc974a81246bbb4 (patch)
tree2100684511c27b7c58c8d6e7fc824fac5c4244ac /pkgs/tools/audio
parent184138de6e5a816463dd7519ec46784d1625ad91 (diff)
tts: 0.9.0 -> 0.10.2
https://github.com/coqui-ai/TTS/releases/tag/v0.10.2
https://github.com/coqui-ai/TTS/releases/tag/v0.10.1
https://github.com/coqui-ai/TTS/releases/tag/v0.10.0
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r--pkgs/tools/audio/tts/default.nix27
1 files changed, 23 insertions, 4 deletions
diff --git a/pkgs/tools/audio/tts/default.nix b/pkgs/tools/audio/tts/default.nix
index 0a084498a96d7..3e6bed334c29b 100644
--- a/pkgs/tools/audio/tts/default.nix
+++ b/pkgs/tools/audio/tts/default.nix
@@ -1,6 +1,7 @@
 { lib
 , python3
 , fetchFromGitHub
+, fetchpatch
 , espeak-ng
 }:
 
@@ -24,7 +25,7 @@ let
         src = super.fetchPypi {
           pname = "librosa";
           inherit version;
-          sha256 = "c53d05e768ae4a3e553ae21c2e5015293e5efbfd5c12d497f1104cb519cca6b3";
+          hash = "sha256-xT0F52iuSj5VOuIcLlAVKT5e+/1cEtSX8RBMtRnMprM=";
         };
       });
     };
@@ -32,16 +33,29 @@ let
 in
 python.pkgs.buildPythonApplication rec {
   pname = "tts";
-  version = "0.9.0";
+  version = "0.10.2";
   format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "coqui-ai";
     repo = "TTS";
-    rev = "v${version}";
-    sha256 = "sha256-p4I583Rs/4eig7cnOcJjri2ugOLAeF2nvPIvMZrN1Ss=";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-IcuRhsURgEYIuS7ldZtxAy4Z/XNDehTGsOfYW+DhScg=";
   };
 
+  patches = [
+    # Use packaging.version for version comparisons
+    (fetchpatch {
+      url = "https://github.com/coqui-ai/TTS/commit/77a9ef8ac97ea1b0f7f8d8287dba69a74fdf22ce.patch";
+      hash = "sha256-zWJmINyxw2efhR9KIVkDPHao5703zlpCKwdzOh/1APY=";
+    })
+    # Fix espeak version detection logic
+    (fetchpatch {
+      url = "https://github.com/coqui-ai/TTS/commit/0031df0143b069d7db59ba04d1adfafcc1a92f47.patch";
+      hash = "sha256-6cL9YqWrB+0QomINpA9BxdYmEDpXF03udGEchydQmBA=";
+    })
+  ];
+
   postPatch = let
     relaxedConstraints = [
       "cython"
@@ -64,6 +78,7 @@ python.pkgs.buildPythonApplication rec {
 
   nativeBuildInputs = with python.pkgs; [
     cython
+    packaging
   ];
 
   propagatedBuildInputs = with python.pkgs; [
@@ -82,6 +97,7 @@ python.pkgs.buildPythonApplication rec {
     mecab-python3
     nltk
     numba
+    packaging
     pandas
     pypinyin
     pysbd
@@ -134,6 +150,8 @@ python.pkgs.buildPythonApplication rec {
     "test_run_all_models"
     "test_synthesize"
     "test_voice_conversion"
+    "test_multi_speaker_multi_lingual_model"
+    "test_single_speaker_model"
     # Mismatch between phonemes
     "test_text_to_ids_phonemes_with_eos_bos_and_blank"
     # Takes too long
@@ -151,6 +169,7 @@ python.pkgs.buildPythonApplication rec {
     "tests/tts_tests/test_glow_tts_d-vectors_train.py"
     "tests/tts_tests/test_glow_tts_speaker_emb_train.py"
     "tests/tts_tests/test_glow_tts_train.py"
+    "tests/tts_tests/test_overflow_train.py"
     "tests/tts_tests/test_speedy_speech_train.py"
     "tests/tts_tests/test_tacotron2_d-vectors_train.py"
     "tests/tts_tests/test_tacotron2_speaker_emb_train.py"