gooofy/py-espeak-ng

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

Miyurz opened this issue · 2 comments

cmd = ['espeak-ng',

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 *
  1. Edit it to espeak

  2. Brew installed espeak

$ which espeak 
/usr/local/bin/espeak

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?

@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?