Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chenwei20 opened this issue Oct 27, 2024 · 8 comments
Open

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

chenwei20 opened this issue Oct 27, 2024 · 8 comments

Comments

@chenwei20
Copy link

chenwei20 commented Oct 27, 2024

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
Copy link

blues-green commented Oct 28, 2024

The same for Linux. How do I install it?

@HeCheng0625
Copy link
Collaborator

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

@yuantuo666
Copy link
Collaborator

yuantuo666 commented Oct 28, 2024

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
Copy link
Collaborator

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
Copy link

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

@ytlviv
Copy link

ytlviv commented Nov 27, 2024

I also encountered the same problem, I am mac os, through brew install espeak installation, also reported this error, how to deal with

@AimForNaN
Copy link

I'm getting the same error on my Linux machine. I tried adjusting env vars for both conda and shell session, but nothing seems to work.

@AimForNaN
Copy link

Coming across this issue, I placed the following code at the top of gradio_demo.py:

from phonemizer.backend.espeak.wrapper import EspeakWrapper
EspeakWrapper()

Interestingly, this was sufficient to get passed the error. So, it's not so much that it can't find espeak as much as it is that the runtime error message is a lie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants