Kitt-AI / snowboy

Future versions with model training module will be maintained through a forked version here: https://github.com/seasalt-ai/snowboy
Other
3.1k stars 1k forks source link

ALSA errors & Thread Errors #395

Open bzmar opened 6 years ago

bzmar commented 6 years ago

Quick Question,

I'm running the demo.py with a personal.pdml. I was able to remove some of the errors by commenting out some lines in alsa.conf in the /use/share/alsa. However, there are three different types of errors I am getting:

When it works on first run I get: 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 connect(2) call to /tmp/jack-1000/default/jack_0 failed (err=No such file or directory) attempt to connect to server failed Listening... Press Ctrl+C to exit

Then after first run it will crash with these errors: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0' ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front 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 connect(2) call to /tmp/jack-1000/default/jack_0 failed (err=No such file or directory) attempt to connect to server failed Expression 'paTimedOut' failed in 'src/os/unix/pa_unix_util.c', line: 387 Expression 'PaUnixThread_New( &stream->thread, &CallbackThreadFunc, stream, 1., stream->rtSched )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2998 Expression 'pthread_join( self->thread, &pret )' failed in 'src/os/unix/pa_unix_util.c', line: 441

After crashing I get these errors: 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 connect(2) call to /tmp/jack-1000/default/jack_0 failed (err=No such file or directory) attempt to connect to server failed Traceback (most recent call last): File "demo.py", line 27, in detector = snowboydecoder.HotwordDetector(model, sensitivity=0.5) File "/home/pi/rpi-arm-raspbian-8.0-1.1.1/snowboydecoder.py", line 126, in init stream_callback=audio_callback) File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 750, in open stream = Stream(self, *args, kwargs) File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 441, in init self._stream = pa.open(arguments) IOError: [Errno -9996] Invalid input device (no default output device)

Anyone aware of fixes for the thread issue?

Flowdeeps commented 6 years ago

Exactly the same for me.

john170502 commented 6 years ago

Snowboy is running for first error.

chenguoguo commented 6 years ago

Those were all ALSA errors, not from Snowboy.

Sometimes, when you see errors under When it works on first run I get:, Snowboy is actually working.

But your last error IOError: [Errno -9996] Invalid input device (no default output device) either means your microphone is not available, or means your microphone does not support 16K sampling rate.

Make sure rec -r 16000 -c 1 -b 16 -e signed-integer -t wav test.wav works on your device.

jabbadabbadahat commented 6 years ago

I have same problem, I used this one: rec -r 16000 -c 1 -b 16 -e signed-integer -t wav test.wav

and it works... Im getting this errors while i try to run : python demo.py ~/snowboy2/resources/models/snowboy.umdl

Errors:

python demo.py ~/snowboy2/resources/models/snowboy.umdl Traceback (most recent call last): File "demo.py", line 27, in <module> detector = snowboydecoder.HotwordDetector(model, sensitivity=0.5) File "/home/pi/snowboy2/examples/Python/snowboydecoder.py", line 139, in __init__ stream_callback=audio_callback) File "/home/pi/.local/lib/python2.7/site-packages/pyaudio.py", line 750, in open stream = Stream(self, *args, **kwargs) File "/home/pi/.local/lib/python2.7/site-packages/pyaudio.py", line 441, in __init__ self._stream = pa.open(**arguments) IOError: [Errno -9996] Invalid input device (no default output device)

firsttady commented 5 years ago

@jabbadabbadahat yeah,the same error as yours,Do you solve this error now? thanks

Techieali commented 4 years ago

i am also getting a similar error, but i am able to detect my hot word after that thrown error IOError: [Errno -9997] Invalid sample rate

Techieali commented 4 years ago

is there any fix for this