gpt-assistant icon indicating copy to clipboard operation
gpt-assistant copied to clipboard

ModuleNotFoundError: No module named 'pyaudio'

Open kamil-malinski opened this issue 1 year ago • 2 comments

Hi!

Maybe it's just a local issue, but after running "make run" I get:

Traceback (most recent call last):
  File "/Users/admin/Library/Caches/pypoetry/virtualenvs/gpt-assistant-YD-VbWQZ-py3.9/lib/python3.9/site-packages/speech_recognition/__init__.py", line 108, in get_pyaudio
    import pyaudio
ModuleNotFoundError: No module named 'pyaudio'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/admin/Projects/gpt-assistant/main.py", line 3, in <module>
    import gpt_assistant.recording as recording
  File "/Users/admin/Projects/gpt-assistant/gpt_assistant/recording.py", line 15, in <module>
    with sr.Microphone() as source:
  File "/Users/admin/Library/Caches/pypoetry/virtualenvs/gpt-assistant-YD-VbWQZ-py3.9/lib/python3.9/site-packages/speech_recognition/__init__.py", line 80, in __init__
    self.pyaudio_module = self.get_pyaudio()
  File "/Users/admin/Library/Caches/pypoetry/virtualenvs/gpt-assistant-YD-VbWQZ-py3.9/lib/python3.9/site-packages/speech_recognition/__init__.py", line 110, in get_pyaudio
    raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
make: *** [run] Error 1

I'm on MacOS and I installed pyaudio with:

brew install portaudio
pip3 install pyaudio

but I still get the same error about the missing pyaudio module

kamil-malinski avatar Apr 28 '23 08:04 kamil-malinski