I am running speech to text code on python 3 by importing speech_recognition and my program stuck on "say something" and showing
sudo jack_control start //terminal commmand
--- start
sudo python speech.py //terminal command
terminal output:
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
speak say anything
python3 code:
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print('speak say anything')
audio = r.listen(source)
text = r.recognize_google(audio)
print("you said:{}".format(text))
I am not able to find the problem whether it is in jack or in code.