gooofy / py-espeak-ng

Some simple wrappers around eSpeak NG intended to make using this excellent TTS for waveform and IPA generation as convenient as possible.
Apache License 2.0
38 stars 7 forks source link

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

Open rbennett24 opened 2 years ago

rbennett24 commented 2 years ago

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 commented 2 years ago

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 commented 12 months ago

"pip install espeakng" gives you a different repo.

try: "pip install py-espeak-ng"