Closed KiboOst closed 4 years ago
I was just testing a very similar set up with a Pi 3 (Buster, 2Mic Respeaker, etc) and was having success with arecord
. Are you able to use arecord
on the command line without error?
arecord -d 10 /tmp/test-mic.wav
aplay /tmp/test-mic.wav
works perfectly
Hmmmm...maybe I need to get a Pi 4 to test.
Any idea ? I've not seen this error lately, but always got this when start/restart rhasspy and saying hotword few seconds after. If I say the hotword a minute or so after startup, no problem
DEBUG:DialogueManager:decoder started DEBUG:DialogueManager:Actors loaded DEBUG:DialogueManager:loading -> ready INFO:DialogueManager:Automatically listening for wake word DEBUG:DialogueManager:ready -> asleep DEBUG:SnowboyWakeListener:loaded -> listening DEBUG:ARecordAudioRecorder:started -> recording DEBUG:ARecordAudioRecorder:['arecord', '-q', '-r', '16000', '-f', 'S16_LE', '-c', '1', '-t', 'raw', '-D', 'sysdefault:CARD=seeed2micvoicec'] DEBUG:ARecordAudioRecorder:Recording from microphone (arecord) INFO:main:Started DEBUG:main:Starting web server at http://0.0.0.0:12101 Running on https://0.0.0.0:12101 (CTRL + C to quit) [2019-12-20 11:32:20,596] ASGI Framework Lifespan error, continuing without Lifespan support WARNING:quart.serving:ASGI Framework Lifespan error, continuing without Lifespan support DEBUG:SnowboyWakeListener:Hotword(s) detected: ['snowboy/hey_brigitte.pmdl'] [2019-12-20 11:32:35,013] 192.168.0.10:57516 GET /api/events/log 1.1 101 - 14364628 INFO:quart.serving:192.168.0.10:57516 GET /api/events/log 1.1 101 - 14364628 DEBUG:DialogueManager:Awake! DEBUG:DialogueManager:asleep -> awake DEBUG:SnowboyWakeListener:listening -> loaded DEBUG:WebrtcvadCommandListener:Will timeout in 30 second(s) DEBUG:ARecordAudioRecorder:recording -> started DEBUG:APlayAudioPlayer:['aplay', '-q', '/home/pi/rhasspy/etc/wav/beep_hi.wav'] DEBUG:WebrtcvadCommandListener:loaded -> listening DEBUG:ARecordAudioRecorder:Stopped recording from microphone (arecord) DEBUG:ARecordAudioRecorder:started -> recording DEBUG:ARecordAudioRecorder:['arecord', '-q', '-r', '16000', '-f', 'S16_LE', '-c', '1', '-t', 'raw', '-D', 'sysdefault:CARD=seeed2micvoicec'] DEBUG:ARecordAudioRecorder:Recording from microphone (arecord) arecord: main:828: audio open error: Device or resource busy
Will testing/training it's really a pain ;-)
I'm getting this too occasionally with my 2mic HAT. I wonder if there's a bug in the driver?
This may be fixed in the future when splitting Rhasspy into services, since the recording service will always be on. Starting and stopping arecord too quickly may be causing the problem.
I have Pi 3b+ and ps3eye as a mic.
And I see the same issue Device or resource busy
What I've found is that I see this issue when I use a wakeword... Maybe wakeword doesn't release mic properly, so Rhasspy can't start listen to a command?
If I disable the wakeword and use button "Wake" it works perfectly
Will testing/training it's really a pain ;-)
If you need just to test your Rhasspy try to use "Wake" button with disabled wakeword in settings
I've pushed a (possible) fix for this. By default now, Rhasspy will not close/re-open the microphone after hearing the wake word. It will just keep recording from the microphone until Rhasspy is closed.
Let me know if this helps!
Also suggested by @jthomasdewald: add to /boot/config.txt
to disable Pi built-in audio:
##turn off onboard alsa interface
dtparam=audio=off
Here is full console debug from an error I have after starting rhasspy and saying wakword for first timae. Also happend time to time. Come back to regarding around 20sec later.