Reputation: 11
#raise AttributeError("Could not find PyAudio; check installation")
# AttributeError: Could not find PyAudio; check installation
# I have tried every type of pip or sudo type of commands but its # not working it just says PyAudio is missing
import speech_recognition as sr
# get audio from the microphone
r = sr.Recognizer()
with sr.Microphone() as source:
print("Speak:")
audio = r.listen(source)
try:
print("You said " + r.recognize_google(audio))
except sr.UnknownValueError:
print("Could not understand audio")
except sr.RequestError as e:
print("Could not request results; {0}".format(e))
Upvotes: 0
Views: 2015
Reputation: 1
You can directly install the PyAudio Wheel from here
For more info on using speech recognition with python you can check out this
Upvotes: 0
Reputation: 426
You may need to get some additional packages, based off of operating system.
If you don't have Homebrew (brew), download the it here.
$ brew install portaudio
$ pip install pyaudio
If you don't have Homebrew (brew), download the it here.
$ brew install portaudio
$ pip install pyaudio
$ pip install pyaudio
I found this answer here.
Upvotes: 3