-1

My error is:

Traceback (most recent call last): File "C:\Users\gaura\AppData\Local\Programs\Python\Python37-32\lib\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 "C:/Users/gaura/PycharmProjects/jarvis_prog/jarvis.py", line 46, in takeCommand() File "C:/Users/gaura/PycharmProjects/jarvis_prog/jarvis.py", line 28, in takeCommand with sr.Microphone() as source: File "C:\Users\gaura\AppData\Local\Programs\Python\Python37-32\lib\site-packages\speech_recognition__init__.py", line 79, in init self.pyaudio_module = self.get_pyaudio() File "C:\Users\gaura\AppData\Local\Programs\Python\Python37-32\lib\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

Masoud Rahimi
  • 5,785
  • 15
  • 39
  • 67
Gaurav
  • 11
  • 3

3 Answers3

1
  • Check your python version & download the pyaudio file which supports your version i.e. if your are using python 3.9, you will have to download PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl Note: This file is for 64-bit os
  • Open the terminal in the folder where the file is downloaded and enter the following command to install the file. Replace the some-package.whl with the name of the downloaded file

pip install some-package.whl

  • Install the SpeechRecognition module using pip install SpeechRecognition and then run the program
Vinay
  • 36
  • 2
0

if you want to deal with speech recognition there is a module named SpeechRecognition install it by

pip install SpeechRecognition
0

It seems that your system lacks pyaudio.

You can simply grab the Wheel package from here and then install it with pip install PyAudio‑0.2.11‑cp37‑cp37m‑win32.whl. Then try to install your package.

Masoud Rahimi
  • 5,785
  • 15
  • 39
  • 67