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 authored and Mic92 committed Dec 22, 2024
1 parent 4cab5e0 commit 4cc13ba
Showing 1 changed file with 21 additions and 29 deletions.
50 changes: 21 additions & 29 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 @@ -197,11 +189,11 @@ python.pkgs.buildPythonApplication rec {
};

meta = with lib; {
homepage = "https://github.com/coqui-ai/TTS";
changelog = "https://github.com/coqui-ai/TTS/releases/tag/v${version}";
homepage = "https://github.com/idiap/coqui-ai-TTS";
changelog = "https://github.com/idiap/coqui-ai-TTS/releases/tag/v${version}";
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 4cc13ba

Please sign in to comment.