Open aaroncheung123 opened 6 years ago
Try in terminal in your project / virtual environment:
python -i
import pyaudio
Do you also get an error?
Yes I do. Below is the error I got.
>>> import pyaudio Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pyaudio
That's my problem. I have done pip install pyaudio but it is still giving me that error. I'm using a virtual environment, I'm using python 2.7, and I am on a raspberry pi 3.
Do you get an error when installing pyaudio?
No, there are no errors. I just and pyaudio does import when I pull up python. I think the restart helped.
When I run this code
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("Waiting to be called on")
audio = r.listen(source)
try:
#print(r.recognize_google(audio))
if "hey buddy" in r.recognize_google(audio):
print('Yay')
except sr.UnknownValueError:
print("Could not understand audio")
except sr.RequestError as e:
print("Could not request results; {0}".format(e))
This is the error I receive.
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
connect(2) call to /tmp/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Waiting to be called on
When I speak into the microphone it just doesn't work. I know the microphone is working too.
dear sir my error is same import pyaudio
please help me
hello guys, I have some problem too
anyone solved this problem?
ubuntu 19.10
i got this problem while installing pyaudio.
i got this problem while installing pyaudio.
I got same problem while installing it on pydroid...if it appears on windows you can fix it using pip install pipwin pipwin install pyaudio
pip install pipwin pipwin install pyaudio
It worked for me (windows)
Not working in window
yes its not working for me either (Windows) although i updated python
What error it shows?
This
On Wed, May 27, 2020 at 4:03 PM sandesh2526 notifications@github.com wrote:
What error it shows?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Uberi/speech_recognition/issues/326#issuecomment-634574171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORWHDSLCRWETLBKCZ452FDRTTT7PANCNFSM4EQZIKGA .
pip install pipwin pipwin install pyaudio
After executing this commands what it shows?
It shows that pipwin is external and is non recognised I tried
On Wed, 27 May 2020 at 7:12 PM, sandesh2526 notifications@github.com wrote:
pip install pipwin pipwin install pyaudio
After executing this commands what it shows?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Uberi/speech_recognition/issues/326#issuecomment-634669178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORWHDURJ6CW6LIEN6HP663RTUKDLANCNFSM4EQZIKGA .
-
On Wed, May 27, 2020 at 7:17 PM riyaaa singh singhriyaaa544@gmail.com wrote:
It shows that pipwin is external and is non recognised I tried
On Wed, 27 May 2020 at 7:12 PM, sandesh2526 notifications@github.com wrote:
pip install pipwin pipwin install pyaudio
After executing this commands what it shows?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Uberi/speech_recognition/issues/326#issuecomment-634669178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORWHDURJ6CW6LIEN6HP663RTUKDLANCNFSM4EQZIKGA .
Can you share a screenshot of error...?
pipwin error
On Thu, May 28, 2020 at 11:36 AM sandesh2526 notifications@github.com wrote:
Can you share a screenshot of error...?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Uberi/speech_recognition/issues/326#issuecomment-635125655, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORWHDWSG6JQHPQJ6CKAOLDRTX5PPANCNFSM4EQZIKGA .
What are you using IDE or command prompt?
cmd also im using windows
On Fri, May 29, 2020 at 4:31 PM sandesh2526 notifications@github.com wrote:
What are you using IDE or command prompt?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Uberi/speech_recognition/issues/326#issuecomment-635911742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORWHDVW23UBUWBZP23TTBLRT6IXLANCNFSM4EQZIKGA .
This might work- install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl
not working
On Sat, May 30, 2020 at 5:05 PM sandesh2526 notifications@github.com wrote:
This might work- install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Uberi/speech_recognition/issues/326#issuecomment-636318430, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORWHDQ7XD4CVR5OGW5GURDRUDVO7ANCNFSM4EQZIKGA .
Use python version 3.6 not above than that
On Wednesday, May 27, 2020, maannsaayyy notifications@github.com wrote:
yes its not working for me either (Windows) although i updated python
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Uberi/speech_recognition/issues/326#issuecomment-634565416, or unsubscribe https://github.com/notifications/unsubscribe-auth/APTUWUSZ4QLZW2JMPRLGJULRTTRY3ANCNFSM4EQZIKGA .
But why is this issue happening in latest version of python?
On Wed, Jun 3, 2020 at 9:32 PM Jayant-tembhurkar notifications@github.com wrote:
Use python version 3.6 not above than that
On Wednesday, May 27, 2020, maannsaayyy notifications@github.com wrote:
yes its not working for me either (Windows) although i updated python
— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/Uberi/speech_recognition/issues/326#issuecomment-634565416 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/APTUWUSZ4QLZW2JMPRLGJULRTTRY3ANCNFSM4EQZIKGA
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Uberi/speech_recognition/issues/326#issuecomment-638292747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORWHDV7KH4VMXKURZCJGJLRUZX3HANCNFSM4EQZIKGA .
i got this problem while installing pyaudio.
I got same problem while installing it on pydroid...if it appears on windows you can fix it using pip install pipwin pipwin install pyaudio
Not working .....
When It comes to listing part it was saying
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave```
and code was
with sr.Microphone() as source:
print("Listening")
audio = re.listen(source)
I solved this problem by simply changing the listen() parameter, and installed some pkg
sudo apt-get install portaudio19-dev
sudo apt-get install portaudio19-dev python-all-dev python3-all-dev && sudo pip install pyaudio
pip install pyaudio
with sr.Microphone() as source:
print("Listening")
audio = re.listen(source, timeout=3, phrase_time_limit=3)
I installed pip install pipwin and then when i tried installing pipwin install pyaudio, it is showing syntax error as below :
File "
Please help me on this
pip install pipwin pipwin install PyAudio Try this ommand in cmd not in any IDE
I'm using Linux and for me this command on terminal worked:
sudo apt install python3-pyaudio
If someone still having this issue after installing python3-pyaudio this is how I solved it:
sudo apt-get install portaudio19-dev python3-pyaudio
pip install pyaudio
This is for linux, tested in popOS (should work in ubuntu and other linux distrubtions too)
I am currently trying to get speech recognition to work on my raspberry pi 3 however this is the error that I am getting.
Traceback (most recent call last): File "listen.py", line 8, in <module> with sr.Microphone() as source: File "/home/pi/Documents/Test/env/local/lib/python2.7/site-packages/speech_recognition/__init__.py", line 79, in __init__ self.pyaudio_module = self.get_pyaudio() File "/home/pi/Documents/Test/env/local/lib/python2.7/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
My issue is almost exactly the same as sanster9292 who opened a ticket on June 2, 2017. I tried everything that you asked him to; however, I am still getting the error above. Please, let me know if you need more information. Do you have any idea how to get this to work on my raspberry pi 3?