Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

arecord: main:788: audio open error: Device or resource busy #172

Closed
basnijholt opened this issue Feb 1, 2020 · 5 comments
Closed

arecord: main:788: audio open error: Device or resource busy #172

basnijholt opened this issue Feb 1, 2020 · 5 comments

Comments

@basnijholt
Copy link

basnijholt commented Feb 1, 2020

I am trying to get Rhasspy working on Hass.io, Raspberry Pi 4, and PS Eye.

After the discussion on the forum we can now add a asound.conf in the UI.

I use this config because that person has the exact same setup as I do.

My microphone volume is too low, so (I believe) I need to use asound such that I can configure the microphone's volume.

PyAudio only works when I practically scream, however, I cannot get the ALSA option to work.

I selected it like
image
But now when I try to record something by clicking on the "Hold to Record" button:
image

Nothing is ever detected.

So I tried recording something using the terminal. I did:

export DOCKER=`sudo docker container ls | grep rhasspy | awk '{print $1}'`
sudo docker exec $DOCKER arecord -d 5 -r 16000 /tmp/test.wav
sudo docker cp $DOCKER:/tmp/test.wav .
# sudo docker exec $DOCKER aplay /tmp/test.wav

and then I get

arecord: main:788: audio open error: Device or resource busy

Another user had the same issue (#29), however, that one was closed due to inactivity (I suppose).
In contrast to the problem of that person, I get the error with both these commands.

I would like to debug this, but not sure where to start?

@voipep
Copy link

voipep commented Feb 4, 2020

Stupid question: Do you have another service running in the background e.g. Snips?

@basnijholt
Copy link
Author

basnijholt commented Feb 4, 2020

@voipep, thanks for your response. No, I have no other add-on or integration that uses the microphone.

@voipep
Copy link

voipep commented Feb 4, 2020

I assume you already tried but I had a similiar problem and it worked when I selected another input device than default in the settings (try and error). Sorry that I can't help that much

@synesthesiam
Copy link
Owner

If Rhasspy is listening for a wake word when you exec into the Docker container, you'll definitely get the "busy" message. To start debugging, I'd advise turning off the wake word functionality and restarting Rhasspy.

In the most recent release (2.4.17), I also added a button to the web UI that I see on your screen (the green play button). After doing the "Hold to Record", speak, and release, you should be able to hit the button and hear the recorded command. This might help with debugging too.

@basnijholt
Copy link
Author

basnijholt commented Feb 16, 2020

If Rhasspy is listening for a wake word

@synesthesiam, that was indeed the problem!

The microphone is working correctly now. On to solving the next problem :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants