PromtEngineer / Verbi

A modular voice assistant application for experimenting with state-of-the-art transcription, response generation, and text-to-speech models. Supports OpenAI, Groq, Elevanlabs, CartesiaAI, and Deepgram APIs, plus local models via Ollama. Ideal for research and development in voice technology.
MIT License
123 stars 35 forks source link

(install error) ERROR: Could not build wheels for PyAudio, which is required to install pyproject.toml-based projects #10

Open replete opened 2 weeks ago

replete commented 2 weeks ago

OS: MacOS 14.5 Sonoma Hardware: Intel Python: 3.12.3 shell: bash

This error appears after the pip3 install -r requirements.txt step.

The solution was to start over but beforehand install portaudio via homebrew: brew install portaudio

...
Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)
Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Downloading pure_eval-0.2.2-py3-none-any.whl (11 kB)
Downloading wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 kB 2.7 MB/s eta 0:00:00
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Building wheels for collected packages: PyAudio
  Building wheel for PyAudio (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for PyAudio (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-13.0-x86_64-cpython-312
      creating build/lib.macosx-13.0-x86_64-cpython-312/pyaudio
      copying src/pyaudio/__init__.py -> build/lib.macosx-13.0-x86_64-cpython-312/pyaudio
      running build_ext
      building 'pyaudio._portaudio' extension
      creating build/temp.macosx-13.0-x86_64-cpython-312
      creating build/temp.macosx-13.0-x86_64-cpython-312/src
      creating build/temp.macosx-13.0-x86_64-cpython-312/src/pyaudio
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -DMACOS=1 -I/usr/local/include -I/usr/include -I/opt/homebrew/include -I/Users/phil/dev/Verbi/venv/include -I/usr/local/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c src/pyaudio/device_api.c -o build/temp.macosx-13.0-x86_64-cpython-312/src/pyaudio/device_api.o
      src/pyaudio/device_api.c:9:10: fatal error: 'portaudio.h' file not found
      #include "portaudio.h"
               ^~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyAudio
Failed to build PyAudio
ERROR: Could not build wheels for PyAudio, which is required to install pyproject.toml-based projects
(venv)
replete commented 2 weeks ago

following this:

$ python3 run_voice_assistant.py
pygame 2.5.2 (SDL 2.28.3, Python 3.12.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "/Users/phil/dev/Verbi/run_voice_assistant.py", line 6, in <module>
    from voice_assistant.audio import record_audio, play_audio
  File "/Users/phil/dev/Verbi/voice_assistant/audio.py", line 7, in <module>
    import pydub
ModuleNotFoundError: No module named 'pydub'
(venv)

(I got it working, just a headsup)

rapatapa commented 1 week ago

pip install pydub

replete commented 1 week ago

(I got it working, just a headsup)

@rapatapa