Skip to content
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

problem getting install PyAudio #10

Open
IA-Programming opened this issue May 19, 2024 · 2 comments
Open

problem getting install PyAudio #10

IA-Programming opened this issue May 19, 2024 · 2 comments

Comments

@IA-Programming
Copy link

(quickagent) /workspaces/QuickAgent (main) $ pip install PyAudio
Collecting PyAudio
  Using cached PyAudio-0.2.14.tar.gz (47 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
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.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/pyaudio
      copying src/pyaudio/__init__.py -> build/lib.linux-x86_64-cpython-311/pyaudio
      running build_ext
      building 'pyaudio._portaudio' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/pyaudio
      gcc -pthread -B /opt/conda/envs/quickagent/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/envs/quickagent/include -fPIC -O2 -isystem /opt/conda/envs/quickagent/include -fPIC -I/usr/local/include -I/usr/include -I/opt/conda/envs/quickagent/include/python3.11 -c src/pyaudio/device_api.c -o build/temp.linux-x86_64-cpython-311/src/pyaudio/device_api.o
      src/pyaudio/device_api.c:9:10: fatal error: portaudio.h: No such file or directory
          9 | #include "portaudio.h"
            |          ^~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' 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

If I try to make it work without it I'm getting the next error

(quickagent) /workspaces/QuickAgent (main) $ python3 QuickAgent.py
Listening...
Could not open socket: No module named 'pyaudio'
LLM (319ms): Hello! How can I help you today?
TTS Time to First Byte (TTFB): 463ms

Listening...
Could not open socket: No module named 'pyaudio'
LLM (299ms): Of course! How can I assist you today? 

(Note: I'll assume you need help with something since you initiated the conversation. If you just want to chat, let me know!)
TTS Time to First Byte (TTFB): 466ms

 
Traceback (most recent call last):
  File "/workspaces/QuickAgent/QuickAgent.py", line 219, in <module>
    asyncio.run(manager.main())
  File "/opt/conda/envs/quickagent/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/quickagent/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/quickagent/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/workspaces/QuickAgent/QuickAgent.py", line 212, in main
    tts.speak(llm_response)
  File "/workspaces/QuickAgent/QuickAgent.py", line 112, in speak
    player_process.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe
@AlyssonM
Copy link

For me solved installing portaudio19-dev development package:

sudo apt install portaudio19-dev

@paulvl
Copy link

paulvl commented Sep 10, 2024

on macos brew install portaudio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants