New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
microphone_recognition.py: unable to open slave, Unknown PCM cards.pcm.rear #191
Comments
Here is my additional test. I tested on microphone_recognition.py. The result showed that only google speech recognition works well. Sphinx error; missing PocketSphinx module: ensure that PocketSphinx is set up correctly. |
Hi @zhihongzeng, For See the library reference for more information. I also recommend starting with the README - it contains information about how to make the others work properly.
|
I know it's a bit late, but I've done with that problem by calibrating energy threshold: import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
r.adjust_for_ambient_noise(source) # here
print("Say something!")
audio = r.listen(source) |
I have done the changes but problem still same |
For me, what have worked was:
Here my complete code:
Not sure if it's necessary, but I did this in the linux mint 20 in order to make possible installing the speech_recognition
links: |
Working env (1/1/2017):
ubuntu 16.04 LTS
python 2.7.12
speech_recognition 3.5.0
pyaudio 0.2.9
build-in micro in the laptop is responsive to sound.
Code:
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("Say something!")
audio = r.listen(source)
Outputs:
ALSA lib pcm_dsnoop.c:606:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
Say something!
The program does not response to speech
Any suggestions would be appreciated.
The text was updated successfully, but these errors were encountered: