nrl-ai / llama-assistant

AI-powered assistant to help you with your daily tasks, powered by Llama 3.2. It can recognize your voice, process natural language, and perform various actions based on your commands: summarizing text, rephasing sentences, answering questions, writing emails, and more.
https://llama-assistant.nrl.ai/
GNU General Public License v3.0
423 stars 31 forks source link

Error re: "unable to find libwhisper" when running llama-assistant from the command line #6

Open adhulipa opened 1 month ago

adhulipa commented 1 month ago
~►llama-assistant                                                                                                                 (base) 113.203s 15:13

Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniconda/base/bin/llama-assistant", line 5, in <module>
    from llama_assistant.main import main
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/llama_assistant/main.py", line 5, in <module>
    from llama_assistant.llama_assistant import LlamaAssistant
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/llama_assistant/llama_assistant.py", line 49, in <module>
    from llama_assistant.speech_recognition_thread import SpeechRecognitionThread
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/llama_assistant/speech_recognition_thread.py", line 9, in <module>
    from pywhispercpp.model import Model
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/pywhispercpp/model.py", line 14, in <module>
    import _pywhispercpp as pw
ImportError: dlopen(/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/_pywhispercpp.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libwhisper.1.dylib
  Referenced from: <BF3201C1-7D2D-33A4-8231-2370CFD402A7> /opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/_pywhispercpp.cpython-312-darwin.so
  Reason: tried: '/private/var/folders/pv/bhts_8cx5z90483yx_04qfdh0000gn/T/pip-req-build-y46w04f8/build/lib.macosx-11.1-arm64-cpython-312/libwhisper.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/pv/bhts_8cx5z90483yx_04qfdh0000gn/T/pip-req-build-y46w04f8/build/lib.macosx-11.1-arm64-cpython-312/libwhisper.1.dylib' (no such file), '/private/var/folders/pv/bhts_8cx5z90483yx_04qfdh0000gn/T/pip-req-build-y46w04f8/build/lib.macosx-11.1-arm64-cpython-312/libwhisper.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/pv/bhts_8cx5z90483yx_04qfdh0000gn/T/pip-req-build-y46w04f8/build/lib.macosx-11.1-arm64-cpython-312/libwhisper.1.dylib' (no such file), '/opt/homebrew/Caskroom/miniconda/base/bin/../lib/libwhisper.1.dylib' (no such file), '/opt/homebrew/Caskroom/miniconda/base/bin/../lib/libwhisper.1.dylib' (no such file)

here's everything I tried to fix the issue

llama-assistant

brew install ffmpeg

pip install pywhispercpp

pip install whisper-cpp-python

pip install --global-option='build_ext' \
    --global-option='-I/usr/local/include' \
    --global-option='-L/usr/local/lib' \
    pyaudio

python -m llama_assistant.main

pip install libwhisper
brew install libwhisper
pip uninstall llama-cpp-python -y
CMAKE_ARGS="-DGGML_METAL=on" pip install -U llama-cpp-python --no-cache-dir

xcode-select -p
pip install pyaudio
pip install git+https://github.com/vietanhdev/pywhispercpp.git
pip install llama-assistant

brew install portaudio
vietanhdev commented 1 month ago

Hi @adhulipa , You can install pywhispercpp by this command to fix this problem.

git clone https://github.com/vietanhdev/pywhispercpp.git
cd pywhispercpp
pip install .

However, in the latest version on main, I replaced pywhispercpp with whispercpp.py. Please check the newest code to see if it helps. Thank you!