thorstenMueller / Thorsten-Voice

Thorsten-Voice: A free to use, offline working, high quality german TTS voice should be available for every project without any license struggling.
http://www.thorsten-voice.de
Creative Commons Zero v1.0 Universal
545 stars 51 forks source link

NumPy (Torch) issues #45

Closed ghostlyghastly closed 1 year ago

ghostlyghastly commented 1 year ago

Hi, thanks for providing this data and documentation.

I tried following instructions for Thorsten-22.08-Tacotron2-DDC but:

$ tts-server --model_name tts_models/de/thorsten/tacotron2-DDC
C:\Python310\lib\site-packages\torchaudio\compliance\kaldi.py:22: UserWarning: Failed to initialize NumPy: module compiled against API version 0x10 but this version of numpy is 0xf (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:77.)
  EPSILON = torch.tensor(torch.finfo(torch.float).eps)
Traceback (most recent call last):
  File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python310\Scripts\tts-server.exe\__main__.py", line 4, in <module>
  File "C:\Python310\lib\site-packages\TTS\server\server.py", line 102, in <module>
    synthesizer = Synthesizer(
  File "C:\Python310\lib\site-packages\TTS\utils\synthesizer.py", line 76, in __init__
    self._load_tts(tts_checkpoint, tts_config_path, use_cuda)
  File "C:\Python310\lib\site-packages\TTS\utils\synthesizer.py", line 113, in _load_tts
    self.tts_model = setup_tts_model(config=self.tts_config)
  File "C:\Python310\lib\site-packages\TTS\tts\models\__init__.py", line 13, in setup_model
    model = MyModel.init_from_config(config, samples)
  File "C:\Python310\lib\site-packages\TTS\tts\models\tacotron2.py", line 432, in init_from_config
    tokenizer, new_config = TTSTokenizer.init_from_config(config)
  File "C:\Python310\lib\site-packages\TTS\tts\utils\text\tokenizer.py", line 188, in init_from_config
    phonemizer = get_phonemizer_by_name(config.phonemizer, **phonemizer_kwargs)
  File "C:\Python310\lib\site-packages\TTS\tts\utils\text\phonemizers\__init__.py", line 42, in get_phonemizer_by_name
    return ESpeak(**kwargs)
  File "C:\Python310\lib\site-packages\TTS\tts\utils\text\phonemizers\espeak_wrapper.py", line 91, in __init__
    raise Exception(" [!] No espeak backend found. Install espeak-ng or espeak to your system.")
Exception:  [!] No espeak backend found. Install espeak-ng or espeak to your system.

So I did

$ pip install numpy --upgrade
Requirement already satisfied: numpy in c:\python310\lib\site-packages (1.22.4)
Collecting numpy
  Using cached numpy-1.24.2-cp310-cp310-win_amd64.whl (14.8 MB)
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.22.4
    Uninstalling numpy-1.22.4:
      Successfully uninstalled numpy-1.22.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tts 0.8.0 requires numpy==1.22.4; python_version == "3.10", but you have numpy 1.24.2 which is incompatible.
numba 0.55.2 requires numpy<1.23,>=1.18, but you have numpy 1.24.2 which is incompatible.
Successfully installed numpy-1.24.2

but:

 $ tts-server --model_name tts_models/de/thorsten/tacotron2-DDC
Traceback (most recent call last):
  File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python310\Scripts\tts-server.exe\__main__.py", line 4, in <module>
  File "C:\Python310\lib\site-packages\TTS\server\server.py", line 14, in <module>
    from TTS.utils.synthesizer import Synthesizer
  File "C:\Python310\lib\site-packages\TTS\utils\synthesizer.py", line 14, in <module>
    from TTS.utils.audio import AudioProcessor
  File "C:\Python310\lib\site-packages\TTS\utils\audio\__init__.py", line 1, in <module>
    from TTS.utils.audio.processor import AudioProcessor
  File "C:\Python310\lib\site-packages\TTS\utils\audio\processor.py", line 3, in <module>
    import librosa
  File "C:\Python310\lib\site-packages\librosa\__init__.py", line 211, in <module>
    from . import core
  File "C:\Python310\lib\site-packages\librosa\core\__init__.py", line 5, in <module>
    from .convert import *  # pylint: disable=wildcard-import
  File "C:\Python310\lib\site-packages\librosa\core\convert.py", line 7, in <module>
    from . import notation
  File "C:\Python310\lib\site-packages\librosa\core\notation.py", line 8, in <module>
    from ..util.exceptions import ParameterError
  File "C:\Python310\lib\site-packages\librosa\util\__init__.py", line 83, in <module>
    from .utils import *  # pylint: disable=wildcard-import
  File "C:\Python310\lib\site-packages\librosa\util\utils.py", line 10, in <module>
    import numba
  File "C:\Python310\lib\site-packages\numba\__init__.py", line 42, in <module>
    from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
  File "C:\Python310\lib\site-packages\numba\np\ufunc\__init__.py", line 3, in <module>
    from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize
  File "C:\Python310\lib\site-packages\numba\np\ufunc\decorators.py", line 3, in <module>
    from numba.np.ufunc import _internal
SystemError: initialization of _internal failed without raising an exception
thorstenMueller commented 1 year ago

Hi @ghostlyghastly , did you run "pip install pip setuptools wheel -U" to upgrade some dependencies before installing TTS? Do you know my video on Coqui TTS on Windows? https://youtu.be/zRaDe08cUIk

thorstenMueller commented 1 year ago

I'll close this issue, but feel free to reopen it in case of further questions.