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

brew install on Mac installs espeak binary instead of espeak-ng #1

Open Miyurz opened 6 years ago

Miyurz commented 6 years ago

https://github.com/gooofy/py-espeak-ng/blob/394826f351bbd693b0170927e654ca5e72ec5e6c/espeakng/__init__.py#L47

Earlier:

$ python talk2.py 
Traceback (most recent call last):
  File "talk2.py", line 4, in <module>
    esng.say('Hello World!')
  File "/Users/miyurz/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages/espeakng/__init__.py", line 103, in say
    self._espeak_exe(args, sync=sync)
  File "/Users/miyurz/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages/espeakng/__init__.py", line 68, in _espeak_exe
    stderr=subprocess.STDOUT)
  File "/Users/miyurz/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/Users/miyurz/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
__init__.py:47:        cmd = ['espeak-ng', 
FileNotFoundError: [Errno 2] No such file or directory: 'espeak-ng': 'espeak-ng'

Fix: 1) Traverse to the code where cmd is hard coded to espeak-ng

$ cd /Users/miyurz/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages/espeakng/
✔ ~/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages/espeakng 
14:07 $ grep -nr espeak-ng *

2) Edit it to espeak

3) Brew installed espeak

$ which espeak 
/usr/local/bin/espeak
gooofy commented 6 years ago

sounds to me like an issue with the package manager you are using - I guess it should install espeak-ng if you ask for that?

hyansuper commented 3 years ago

@Miyurz can you install espeak-ng with brew? the espeak-ng git readme says espeak is a history version of espeak-ng before 2015. If you change cmd to 'espeak', does all the api work as well?