Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALSA dies after a while #66

Open
pabsi opened this issue Apr 24, 2020 · 4 comments
Open

ALSA dies after a while #66

pabsi opened this issue Apr 24, 2020 · 4 comments

Comments

@pabsi
Copy link

pabsi commented Apr 24, 2020

Hello there,
using this with a Jabra 510 USB on the host, and works flawlessly for a while...eventually dying (not responding to "Hey Mycroft", and not even using mycroft-say-to command).

From the voice.log file:

2020-04-24 00:10:58.723 | INFO     |    31 | mycroft.client.speech.listener:create_wakeup_recognizer:360 | creating stand up word engine
2020-04-24 00:10:58.724 | INFO     |    31 | mycroft.client.speech.hotword_factory:load_module:386 | Loading "wake up" wake word via pocketsphinx
2020-04-24 00:10:58.747 | INFO     |    31 | mycroft.messagebus.client.client:on_open:67 | Connected
ALSA lib pcm.c:8306:(snd_pcm_recover) overrun occurred
ALSA lib pcm.c:8309:(snd_pcm_recover) cannot recovery from overrun, prepare failed: Input/output error
Expression 'alsa_snd_pcm_prepare( stream->capture.pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2932
Expression 'AlsaStart( stream, 0 )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3246
Expression 'AlsaRestart( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3313
Expression 'PaAlsaStream_HandleXrun( stream )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4520

My config in the host I am assuming it's correct, since it works on both the host, and the container (although just for a while in the latter).

For the container, I mount the pulse socket and the cookie as required in the README.

Any help would be appreciated.

@mjkaye
Copy link
Contributor

mjkaye commented Apr 29, 2020

I was getting this error message a while back. Unfortunately, I don't remember exactly what I did to fix it.

Does anything relevant show up in the host's logs at around the same timestamp? Have you tried running the container without the parameter --device /dev/snd? I don't use that parameter any more, but I don't remember whether that decision was specifically related to the error message.

@pabsi
Copy link
Author

pabsi commented Apr 29, 2020

I did not check the host but I checked that aplay worked as expected, which it did in the host. Not inside the container.

Wait, if you don't use --device /dev/snd then how is it possible that you got it working? Are you currently using Mycroft inside docker?
I certainly haven't tried that as I recall this being a mandatory requirement for anything in docker that needs to access the soundcard device.

@mjkaye
Copy link
Contributor

mjkaye commented Apr 30, 2020

I did not check the host but I checked that aplay worked as expected, which it did in the host. Not inside the container.

I think you've misunderstood me. I have no doubt that sound works on the host. However, the container's ability to play sound relies on communicating with the host's pulseaudio. Examining the host's logs, at the time that the container gives you the error message, may give insight into why that communication is impeded.

Wait, if you don't use --device /dev/snd then how is it possible that you got it working? Are you currently using Mycroft inside docker?

Yes, my dockerized Mycroft runs, with sound, for days at a time.

@pabsi
Copy link
Author

pabsi commented May 1, 2020

Thanks @mjkaye I'll have a look around and get back with some results.

I was also considering running pulseaudio in the container, dedicated there, as I don't use sound in the host at all (it's a headless ubuntu server, so I don't really make any use of the sound directly from the host). I haven't explored this possibility yet.

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

No branches or pull requests

2 participants