You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have been trying to use SpeechRecognition module. Here is my code
importspeech_recognitionassrdefreal_time_speech_recognition():
recognizer=sr.Recognizer()
withsr.Microphone() assource:
print("Say something or press 'q' to end.")
However, it keep on outputting the same error :
Traceback (most recent call last):
File "/Users/nuntea/Documents/Vasundhara Geo technology/Voice recognition and NER/Real Time Speech recogntiion/RTSR.py", line 11, in <module>
real_time_speech_recognition()
File "/Users/nuntea/Documents/Vasundhara Geo technology/Voice recognition and NER/Real Time Speech recogntiion/RTSR.py", line 7, in real_time_speech_recognition
with sr.Microphone() as source:
File "/Users/nuntea/Documents/Vasundhara Geo technology/Voice recognition and NER/Real Time Speech recogntiion/myenv/lib/python3.9/site-packages/speech_recognition/__init__.py", line 80, in __init__
self.pyaudio_module = self.get_pyaudio()
File "/Users/nuntea/Documents/Vasundhara Geo technology/Voice recognition and NER/Real Time Speech recogntiion/myenv/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
However, I have already install PyAudio.
(myenv) nuntea@Zonunmawias-MacBook-Air Real Time Speech recogntiion % pip list
Package Version
------------------------------------------------- ----------
certifi 2023.11.17
charset-normalizer 3.3.2
idna 3.4
keyboard 0.13.5
pip 23.3.1
PyAudio 0.2.14
requests 2.31.0
setuptools 69.0.0
SpeechRecognition 3.10.0
urllib3 2.1.0
wheel 0.41.3
I have tried different method mention in stackoverflow and other resources but couldn't fixed it :
(myenv) nuntea@Zonunmawias-MacBook-Air Real Time Speech recogntiion % xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates
(myenv) nuntea@Zonunmawias-MacBook-Air Real Time Speech recogntiion % brew install portaudio
Warning: portaudio 19.7.0 is already installed and up-to-date.
To reinstall 19.7.0, run:
brew reinstall portaudio
(myenv) nuntea@Zonunmawias-MacBook-Air Real Time Speech recogntiion % pip3 install pyaudio
Requirement already satisfied: pyaudio in ./myenv/lib/python3.9/site-packages (0.2.14)
Please help.
The text was updated successfully, but these errors were encountered:
Hi @Nuna7, I came across the same issue when I first used this library on my M1 Mac too, although I installed PyAudio the way it is described in the README. Below is the part in the docs I did to fix it, let me know if the issue still continues:
On OS X, install PortAudio using Homebrew <http://brew.sh/>: brew install portaudio. Then, install PyAudio using Pip <https://pip.readthedocs.org/>: pip install pyaudio.
Hi, I have been trying to use SpeechRecognition module. Here is my code
However, it keep on outputting the same error :
However, I have already install PyAudio.
I have tried different method mention in stackoverflow and other resources but couldn't fixed it :
Please help.
The text was updated successfully, but these errors were encountered: