coqui-tts/TTS/tts/layers
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
..
align_tts isort all imports 2021-04-09 00:45:20 +02:00
feed_forward format with black 2021-04-09 00:54:59 +02:00
generic Update wavenet.py (#1796) 2022-08-01 12:20:37 +02:00
glow_tts Use packaging.version for version comparisons (#2310) 2023-01-29 23:47:00 +01:00
overflow Adding neural HMM TTS Model (#2272) 2023-01-23 11:53:04 +01:00
tacotron Update capacitron_layers.py (#1664) 2022-08-15 11:08:50 +02:00
vits Trick to Upsampling to High sampling rates using VITS model (#1456) 2022-04-26 11:47:46 +02:00
__init__.py Remove SpeedySpeech from .models.json 2021-09-10 17:47:27 +00:00
losses.py Fastspeech2 (#2073) 2023-01-15 22:39:22 +01:00