Traceback (most recent call last):
File "C:\Users\Anu Nema\AppData\Local\Programs\Python\Python38-32\lib\site-packages\speech_recognition\__init__.py", line 109, 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/Anu Nema/Desktop/New folder/alice/alice.py", line 49, in <module>
takeCommand()
File "c:/Users/Anu Nema/Desktop/New folder/alice/alice.py", line 30, in takeCommand
with sr.Microphone() as source:
File "C:\Users\Anu Nema\AppData\Local\Programs\Python\Python38-32\lib\site-packages\speech_recognition\__init__.py", line 80, in __init__
self.pyaudio_module = self.get_pyaudio()
File "C:\Users\Anu Nema\AppData\Local\Programs\Python\Python38-32\lib\site-packages\speech_recognition\__init__.py", line 111, in get_pyaudio
raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
Asked
Active
Viewed 637 times
2
-
Have you done ‘pip3 install pyaudio’ in the command line? – Eno Gerguri Jun 23 '20 at 07:28
-
Welcome to stackoverflow! Please read [how to ask](https://stackoverflow.com/help/how-to-ask) and [how to create a minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). At its current state, your question is not answerable, please edit it with further details and preferably include some code. – Chase Jun 23 '20 at 08:50
1 Answers
2
The reason that this error occurs is because you do not have ‘pyaudio’ installed on your computer. This is a dependency of ‘speech_recognition’ and therefore you must have it if you wish to use ‘speech_recognition’.
You can do this by typing this command into the command line:
pip3 install pyaudio
This requires you have pip set up on your computer.
This should resolve the error you are having.

Eno Gerguri
- 639
- 5
- 22