coqui-tts/TTS/bin
Martin Weinelt 994be163e1
Use packaging.version for version comparisons (#2310)
* Use packaging.version for version comparisons

The distutils package is deprecated¹ and relies on PEP 386² version
comparisons, which have been superseded by PEP 440³ which is implemented
through the packaging module.

With more recent distutils versions, provided through setuptools
vendoring, we are seeing the following exception during version
comparisons:

> TypeError: '<' not supported between instances of 'str' and 'int'

This is fixed by this migration.

[1] https://docs.python.org/3/library/distutils.html
[2] https://peps.python.org/pep-0386/
[3] https://peps.python.org/pep-0440/

* Improve espeak version detection robustness

On many modern systems espeak is just a symlink to espeak-ng. In that
case looking for the 3rd word in the version output will break the
version comparison, when it finds `text-to-speech:`, instead of a proper
version.

This will not break during runtime, where espeak-ng would be
prioritized, but the phonemizer and tokenizer tests force the backend
to `espeak`, which exhibits this breakage.

This improves the version detection by simply looking for the version
after the "text-to-speech:" token.

* Replace distuils.copy_tree with shutil.copytree

The distutils module is deprecated and slated for removal in Python
3.12. Its usage should be replaced, in this case by a compatible method
from shutil.
2023-01-29 23:47:00 +01:00
..
__init__.py fixing dome pypi issues 2021-01-25 13:06:12 +01:00
collect_env_info.py Make style and lint 2021-12-01 10:42:52 +00:00
compute_attention_masks.py Update model file extension (#1422) 2022-03-22 17:55:00 +01:00
compute_embeddings.py Add YourTTS VCTK recipe (#2198) 2022-12-12 16:14:25 +01:00
compute_statistics.py Update TTS.tts formatters (#1228) 2022-02-11 23:03:43 +01:00
eval_encoder.py Add EmbeddingManager and BaseIDManager (#1374) 2022-03-31 13:41:16 +02:00
extract_tts_spectrograms.py d-vector handling (#1945) 2022-09-13 14:10:33 +02:00
find_unique_chars.py Open bible dataset formatter (#1365) 2022-03-11 10:43:31 +01:00
find_unique_phonemes.py Fix find unique phonemes script (#1928) 2022-09-08 10:17:35 +02:00
remove_silence_using_vad.py Write non-speech files in a TXT (#2048) 2022-10-06 13:25:54 +02:00
resample.py Use packaging.version for version comparisons (#2310) 2023-01-29 23:47:00 +01:00
synthesize.py Cache fsspec downloads (#2132) 2022-11-09 22:12:48 +01:00
train_encoder.py Implement bucketed weighted sampling for VITS (#1871) 2022-08-15 11:08:11 +02:00
train_tts.py Enforce phonemizer definition for synthesis (#1441) 2022-03-25 23:15:33 +01:00
train_vocoder.py Make stlye 2022-02-25 11:31:56 +01:00
tune_wavegrad.py Fix tune wavegrad (#1844) 2022-08-22 09:55:32 +02:00