open-mmlab / Amphion

Amphion (/æmˈfaɪən/) is a toolkit for Audio, Music, and Speech Generation. Its purpose is to support reproducible research and help junior researchers and engineers get started in the field of audio, music, and speech generation research and development.
https://openhlt.github.io/amphion/
MIT License
7.7k stars 583 forks source link

[Help]: RuntimeError: espeak not installed on your system #297

Open chenwei20 opened 3 weeks ago

chenwei20 commented 3 weeks ago

When I execute python maskgct_inference.py on Windows, the following prompt appears

./models/tts/maskgct/g2p\sources\g2p_chinese_model\poly_bert_model.onnx
E:\Amphion\envs\amphion\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
  warnings.warn(
Traceback (most recent call last):
  File "E:\Amphion\models\tts\maskgct\maskgct_inference.py", line 6, in <module>
    from models.tts.maskgct.maskgct_utils import *
  File "E:\Amphion\models\tts\maskgct\maskgct_utils.py", line 26, in <module>
    from models.tts.maskgct.g2p.g2p_generation import g2p, chn_eng_g2p
  File "E:\Amphion\models\tts\maskgct\g2p\g2p_generation.py", line 10, in <module>
    from models.tts.maskgct.g2p.utils.g2p import phonemizer_g2p
  File "E:\Amphion\models\tts\maskgct\g2p\utils\g2p.py", line 17, in <module>
    phonemizer_zh = EspeakBackend(
  File "E:\Amphion\envs\amphion\lib\site-packages\phonemizer\backend\espeak\espeak.py", line 45, in __init__
    super().__init__(
  File "E:\Amphion\envs\amphion\lib\site-packages\phonemizer\backend\espeak\base.py", line 39, in __init__
    super().__init__(
  File "E:\Amphion\envs\amphion\lib\site-packages\phonemizer\backend\base.py", line 77, in __init__
    raise RuntimeError(  # pragma: nocover
RuntimeError: espeak not installed on your system
(amphion) PS E:\Amphion>

I have added espeak to the Path variable in PowerShell and also added it to the user environment variables, but why does it still say that espeak is not installed?

blues-green commented 3 weeks ago

The same for Linux. How do I install it?

HeCheng0625 commented 3 weeks ago

Hi, try to "sudo apt-get install espeak-ng"?

yuantuo666 commented 3 weeks ago

Hi, the MaskGCT is built in a Linux environment. For a better coding experience, it is recommended that Linux be used to reproduce. Besides, we prefer English issues in this repository. (all Chinese question has been translated in to English via Google Translate) According to the stack trace, it seems to be the problem with the phonemizer package, reading their docs might be helpful.

yuantuo666 commented 3 weeks ago

For people who are having problem in configuring the env on a Windows machine, you can try to follow this blog post: https://www.cnblogs.com/v3ucn/p/18511187

justinjohn0306 commented 2 weeks ago

Windows users can try my fork here: https://github.com/justinjohn0306/MaskGCT-Windows