-
Notifications
You must be signed in to change notification settings - Fork 181
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
espeak installed but unable to found by phnemizer #117
Comments
Maybe If you know where your
On Linux you can locate the path to that library with |
on macOS, seems ctypes unable to find it. I installed using brew, and it was inside |
how can you solve ? @jinfagang |
Another reason that can provoque this error on Mac M1/M2, is the architecture incompatibility (arm64 vs x86_64). Here, the For the details:
|
still doesn't work :( |
Sorry, there was a typo mistake in my answer, try again please |
Hi, I'm having this issue on a new M2 mbp. I tried running your commands @amallecourt but still get the same "espeak not installed" error. Do you have to run python with some architecture flag? |
No, I don't think so. |
figured it out—for my brew installation on my m2 the path is |
In my ubuntu environment, set the path works: export PHONEMIZER_ESPEAK_LIBRARY=/usr/bin/espeak-ng |
I tried the same, but its not working for me. When I use terminal and check if I had set the variable correctly? it shows me correct results. yajvikani@Skys-MacBook ~ % echo $PHONEMIZER_ESPEAK_LIBRARY Also, within terminal when I try espeak hello, it works. but it does not work when I use it in a python code: from phonemizer import phonemize RuntimeError: espeak not installed on your system |
你好,邮件已收到,谢谢~
|
I solved this problem on my M1 Mac for running code in Jupyter Notebook: 1. Install arm64 brew:
2. Run export before Jupyter:
3. It should work now, but to be 100% sure, here's some additional code:
|
My Solution for Windows: |
你好,邮件已收到,谢谢~
|
Cheers for that! I just spent hours trying to get this working, this process was helpful. Ensuring that brew is installing the ARM64 version of espeak (and removing any conflicting versions from both /usr/local/bin and /opt/homebrew/... finally got it functioning for me. The ctypes sanity check pointed me in the proper direction. It seems that homebrew defaults to the x86_64 version for some reason, and that conflicts with phonemizer. However : print(ctypes.cdll.LoadLibrary('/usr/local/Cellar/espeak/1.48.04_1/lib/libespeak.1.1.48.dylib')) |
你好,邮件已收到,谢谢~
|
This was it for me. This whole time I was using x86_64 homebrew and installing the arm64 version fixed it. When I switched to arm64, the path changed from Note: A clearer way to debug this would have been if the library loading function prints out the actual error instead of just "espeak not installed on your system". You can print it out in
Then it'll show exactly why the library fails to load. For me, it was refusing to load the x86_64 version and wanted an arm64 version. This is what @vmirnv shows with the sanity checks above in step 3. |
你好,邮件已收到,谢谢~
|
It also worked for me to define the path to the espeak library as follows (macos with m1):
|
你好,邮件已收到,谢谢~
|
Any idea?
The text was updated successfully, but these errors were encountered: