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

ImportError: cannot import name 'ESpeakNG' from 'espeakng' #12

Open
rbennett24 opened this issue May 16, 2022 · 2 comments
Open

ImportError: cannot import name 'ESpeakNG' from 'espeakng' #12

rbennett24 opened this issue May 16, 2022 · 2 comments

Comments

@rbennett24
Copy link

rbennett24 commented May 16, 2022

When I try to run the basic demo code:

from espeakng import ESpeakNG
esng = ESpeakNG()
esng.say('Hello World!')

I get this error:

Traceback (most recent call last):
  File "xxxxxxx.py", line 1, in <module>
    from espeakng import ESpeakNG
ImportError: cannot import name 'ESpeakNG' from 'espeakng' (C:\Users\XXXXXX\AppData\Roaming\Python\Python37\site-packages\espeakng\__init__.py)

Any suggestions? If it matters, I'm on Windows 10, and I can access espeak-ng.exe from the regular command line, so it must be in PATH already. Thanks!

@cescha2018
Copy link

Hi, this is another issue on Linux OS. any suggestion?

Traceback (most recent call last):
File "/home/user/Documentos/Python/Proyecto Majel/Betas/TTS/espeakNG_test.py", line 4, in
esng.say('¡Hola mundo!')
File "/home/user/Documentos/Python/Entorno Virtual/tts/lib/python3.9/site-packages/espeakng/init.py", line 103, in say
return self._espeak_exe(args, sync=sync)
File "/home/user/Documentos/Python/Entorno Virtual/tts/lib/python3.9/site-packages/espeakng/init.py", line 66, in _espeak_exe
p = subprocess.Popen(cmd,
File "/usr/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'espeak-ng'

@jason-kane
Copy link

jason-kane commented Dec 6, 2023

"pip install espeakng" gives you a different repo.

try: "pip install py-espeak-ng"

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

3 participants