-
Notifications
You must be signed in to change notification settings - Fork 472
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
Piper does not work on macOS: /usr/lib/libespeak-ng.1.dylib (no such file) #404
Comments
See this post for a solution |
Thanks for the suggestion. I read that and a thread linked therein, but unfortunately could not find a mention of Additionally, the discussions seem unrelated, primarily focusing on manually building piper and the numerous layered difficulties and complications of doing so, which I'm unable to follow—whereas my issue is specifically regarding the prebuilt release (from Releases or via cloning the repo) and the usage instructions for it given in the main readme. |
I am having the same issues. if there are dependancies for a recompiled package there should be instructions for getting it running. |
@Revmagi @mapleroyal Try the guide (script piper_install_mac.sh) here, let me know if you have any issue: https://github.com/dspasyuk/llama.cui |
Hopefully the guidance on the page dspasyuk linked will help I created wheels for intel based macs that will work on many recent versions of python 3.12, 3.11 . I didnt have ability to create a silicon wheel because I dont have such a mac . It would be useful if someone with a silicon Mac builds wheels to make the process simpler for those who follow. I tried out of curiosity to investigate further the issue with the standalone install of the prepackaged binary you cannot simply just download and unzip the release and it just works out of the box. You will have to install espeak-ng separately and make sure that the files the program requires are either placed in the relevant folder, there are symbol links (alias files) or you pass command line parameters ( where applicable) to tell the program to look elsewhere. it's probably possibly to make it work if you can figure out all the dependencies and locations. I was able to make a little progress by tinkering but without more in depth error messages showing exactly where the program was looking for said file(s) I only got so far. I figured out how to get it installed, largely from the help of another forum post which gave me a deeper understanding of how to build, and also after much trial and error . I built from source, then created wheels (which have the dependencies embedded) , then used my own wheels to install it piper-tts / piper-phonemize with pip. iF you build it from source yourself you need to install cmake with brew, prob have command line Xcode tools ( or whatever it's called) as this contains the header files needed for many build processes. a basic understanding of how you compile from source using make /cmake etc is helpful - you can prob find YouTube videos to fill in gaps of knowledge |
TL;DR the details echo 'Welcome to the world of speech synthesis!' | ./piper --model en_US-lessac-medium.onnx --output_file welcome.wav
dyld: Library not loaded: @rpath/libespeak-ng.1.dylib
Referenced from: ~/piper/./piper
Reason: image not found
Abort trap: 6
brew install espeak-ng
brew info espeak-ng
==> espeak-ng: stable 1.51, HEAD
Speech synthesizer that supports more than hundred languages and accents
https://github.com/espeak-ng/espeak-ng
Installed
/usr/local/Cellar/espeak-ng/1.51 (513 files, 12.9MB) *
Built from source on 2024-05-11 at 16:50:51
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/e/espeak-ng.rb
License: GPL-3.0-or-later and BSD-2-Clause
==> Dependencies
Build: autoconf ✔, automake ✔, libtool ✔
==> Options
--HEAD
Install HEAD version
echo 'Welcome to the world of speech synthesis!' | ./piper --model en_US-lessac-high.onnx --output_file welcome.wav
dyld: Library not loaded: @rpath/libpiper_phonemize.1.dylib
Referenced from: ~/piper/./piper
Reason: image not found
Abort trap: 6
# NOTE: I manually installed https://github.com/rhasspy/piper-phonemize/releases/tag/2023.11.14-4
# untarred, and moved it under the piper directory.
# piper seemed to ignore the executable ./piper_phonemize
# There did not seem to be a USAGE or help describing how to specify binary piper_phonemize as an arg.
./piper --help
# same as last error reported
# Then, I added piper-phonemize to the path.
export DYLD_LIBRARY_PATH=/usr/local//Cellar/espeak-ng/1.51/lib/:./piper-phonemize/lib/
echo 'Welcome to the world of speech synthesis!' | ./piper --model en_US-lessac-medium.onnx --output_file welcome.wav
dyld: Library not loaded: @rpath/libpiper_phonemize.1.dylib
Referenced from: ~/piper/./piper
Reason: no suitable image found. Did find:
./piper-phonemize/lib//libpiper_phonemize.1.dylib: code signature in (./piper-phonemize/lib/libpiper_phonemize.1.dylib) not valid for use in process using Library Validation: library load disallowed by system policy
Abort trap: 6
# I then used manual right-click & Open on the libs that MacOs did not trust.
# The usual prompt asks "macOS cannot verify the developer of libpiper_phonemize. Are you sure you want to open it?"
# I clicked open.
# So now dependencies, environment, and OS trust issues are resolved.
echo 'Welcome to the world of speech synthesis!' | ./piper --model en_US-lessac-high.onnx --output_file welcome.wav
dyld: Symbol not found: _espeak_TextToPhonemesWithTerminator
Referenced from: ./piper-phonemize/lib//libpiper_phonemize.1.dylib (which was built for Mac OS X 12.6)
Expected in: /usr/local//Cellar/espeak-ng/1.51/lib//libespeak-ng.1.dylib
Abort trap: 6 _espeak_TextToPhonemesWithTerminator may be some private symbol in libespeak-ng? |
Hi @ruleset, have you tried running the script I provided in https://github.com/dspasyuk/llama.cui repo? If you want to redo compilation manually you will need to set paths to all the brew libraries as described in piper_install_mac.sh. So for espeak: echo 'export DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/espeak-ng/1.51/lib/:$DYLD_LIBRARY_PATH' >> ~/.zprofile The script has been tested on MacOS Venture 13.2.1 |
This may help. I was able to use pipx to run this on my mac book. Shared my quick thoughts here: #217 (comment) |
I was able to get it running with your script, thanks! Seems you have to build it from the source directly since neither binary or |
well. I managed to get it running after building from source according to https://github.com/dspasyuk/llama.cui but got this
|
Whether downloading the release, or cloning the repo, I'm getting this error:
The text was updated successfully, but these errors were encountered: