Problems with microphone

Hello,

I have a Problem with my TONOR G11 microphone at my RasPi 3.
I installed successfully DeepSpeech 0.9.3 but I have problems with my mic so that I’m not able to make a live voice recognition.

I was able to record via my mic my speech to a wav file - so in general the mic is running. For his I used
arecord -D plughw:1,0 -d 20 test1.wav

arecord -l shows

**** List of CAPTURE Hardware Devices ****
card 1: Device [USB PnP Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

pi@raspberrypi : ~/dspeech $ python3 DeepSpeech-examples/mic_vad_streaming/mic_vad_streaming.py -m deepspeech-0.9.3-models.tflite -s deepspeech-0.9.3-models.scorer

Initializing model…
INFO:root:ARGS.model: deepspeech-0.9.3-models.tflite
TensorFlow: v2.3.0-6-g23ad988
DeepSpeech: v0.9.3-0-gf2e9c85
INFO:root:ARGS.scorer: deepspeech-0.9.3-models.scorer
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
Listening (ctrl-C to exit)…

^CTraceback (most recent call last):
File “DeepSpeech-examples/mic_vad_streaming/mic_vad_streaming.py”, line 224, in
main(ARGS)
File “DeepSpeech-examples/mic_vad_streaming/mic_vad_streaming.py”, line 182, in main
for frame in frames:
File “DeepSpeech-examples/mic_vad_streaming/mic_vad_streaming.py”, line 130, in vad_collector
for frame in frames:
File “DeepSpeech-examples/mic_vad_streaming/mic_vad_streaming.py”, line 114, in frame_generator
yield self.read()
File “DeepSpeech-examples/mic_vad_streaming/mic_vad_streaming.py”, line 82, in read
return self.buffer_queue.get()
File “/usr/lib/python3.7/queue.py”, line 170, in get
self.not_empty.wait()
File “/usr/lib/python3.7/threading.py”, line 296, in wait
waiter.acquire()
KeyboardInterrupt
pi@raspberrypi : ~/dspeech $

In the Alsa.conf I configured
/usr/share/alsa/alsa.conf
defaults.ctl.card 1
defaults.pcm.card 1

Please tell how I can enable my microphone or tell me which microphone I should buy.

THX many time

Klaus

Hm, seems to be Raspi mic day today :slight_smile:

Not an expert on Raspi, but the other thread seems to have a similar problem. DeepSpeech is running, but getting audio to DS is problematic …

I guess you are using the Python demo? It lets you choose a device, maybe you got the wrong one?

Hello,

THX for your tip
now it works with
pi@raspberrypi : ~/dspeech/DeepSpeech-examples/mic_vad_streaming $ python3 ./mic_vad_streaming.py -m ./deepspeech-0.9.3-models.tflite -s ./deepspeech-0.9.3-models.scorer -d 2 -r 16000

regards

Klaus

1 Like