Skip to content

Commit

Permalink
tts: 0.20.2 -> 0.25.1 and switch to idiap fork
Browse files Browse the repository at this point in the history
 to unbreak build: original coqui-ai repo is not maintained anymore.
 https://www.idiap.ch/en/
  • Loading branch information
jbgi committed Dec 20, 2024
1 parent 29f2db4 commit 4a49671
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions pkgs/by-name/tt/tts/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ let
};
in
python.pkgs.buildPythonApplication rec {
pname = "tts";
version = "0.20.2";
pname = "coqui-tts";
version = "0.25.1";
pyproject = true;

src = fetchFromGitHub {
owner = "coqui-ai";
repo = "TTS";
owner = "idiap";
repo = "coqui-ai-TTS";
rev = "refs/tags/v${version}";
hash = "sha256-1nlSf15IEX1qKfDtR6+jQqskjxIuzaIWatkj9Z1fh8Y=";
hash = "sha256-5w1Y9wdoJ+EV/WBwK3nqyY60NEsMjQsfE4g+sJB7VwQ=";
};

postPatch =
Expand All @@ -41,29 +41,24 @@ python.pkgs.buildPythonApplication rec {
"numpy"
"unidic-lite"
"trainer"
"spacy\\[ja\\]"
"transformers"
];
in
''
sed -r -i \
${lib.concatStringsSep "\n" (
map (package: ''-e 's/${package}\s*[<>=]+.+/${package}/g' \'') relaxedConstraints
)}
requirements.txt
sed -r -i \
${lib.concatStringsSep "\n" (
map (package: ''-e 's/${package}\s*[<>=]+[^"]+/${package}/g' \'') relaxedConstraints
)}
pyproject.toml
# only used for notebooks and visualization
sed -r -i -e '/umap-learn/d' requirements.txt
'';

nativeBuildInputs = with python.pkgs; [
cython
numpy
packaging
setuptools
hatchling
];

propagatedBuildInputs = with python.pkgs; [
Expand Down Expand Up @@ -102,15 +97,12 @@ python.pkgs.buildPythonApplication rec {
transformers
unidic-lite
webrtcvad
spacy
monotonic-alignment-search
];

postInstall = ''
cp -r TTS/server/templates/ $out/${python.sitePackages}/TTS/server
# cython modules are not installed for some reasons
(
cd TTS/tts/utils/monotonic_align
${python.pythonOnBuildForHost.interpreter} setup.py install --prefix=$out
)
'';

# tests get stuck when run in nixpkgs-review, tested in passthru
Expand Down Expand Up @@ -161,14 +153,14 @@ python.pkgs.buildPythonApplication rec {
"tests/text_tests/test_phonemizer.py"
# no training, it takes too long
"tests/aux_tests/test_speaker_encoder_train.py"
"tests/tts_tests/test_align_tts_train.py"
"tests/tts_tests/test_fast_pitch_speaker_emb_train.py"
"tests/tts_tests/test_fast_pitch_train.py"
"tests/tts_tests/test_fastspeech_2_speaker_emb_train.py"
"tests/tts_tests/test_fastspeech_2_train.py"
"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_tests2/test_align_tts_train.py"
"tests/tts_tests2/test_fast_pitch_speaker_emb_train.py"
"tests/tts_tests2/test_fast_pitch_train.py"
"tests/tts_tests2/test_fastspeech_2_speaker_emb_train.py"
"tests/tts_tests2/test_fastspeech_2_train.py"
"tests/tts_tests2/test_glow_tts_d-vectors_train.py"
"tests/tts_tests2/test_glow_tts_speaker_emb_train.py"
"tests/tts_tests2/test_glow_tts_train.py"
"tests/tts_tests/test_neuralhmm_tts_train.py"
"tests/tts_tests/test_overflow_train.py"
"tests/tts_tests/test_speedy_speech_train.py"
Expand Down Expand Up @@ -202,6 +194,6 @@ python.pkgs.buildPythonApplication rec {
description = "Deep learning toolkit for Text-to-Speech, battle-tested in research and production";
license = licenses.mpl20;
maintainers = teams.tts.members;
broken = true; # added 2024-04-08
broken = false;
};
}

0 comments on commit 4a49671

Please sign in to comment.