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

Mycroft seems to lose audio capabilities after playing music. #2

Open
ghost opened this issue May 11, 2017 · 11 comments
Open

Mycroft seems to lose audio capabilities after playing music. #2

ghost opened this issue May 11, 2017 · 11 comments

Comments

@ghost
Copy link

ghost commented May 11, 2017

Mycroft seems to stop being able to speak, yet can hear me talk to it.

ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
aplay: main:788: audio open error: Device or resource busy

@forslund
Copy link
Owner

forslund commented May 11, 2017

Thanks for reporting! May I ask which os/platform this is? and maybe which sound system you're using (alsa/pulse audio/etc)

@ghost
Copy link
Author

ghost commented May 11, 2017

Arch linux alsa and pulse both installed. It is only when I have something that uses alsa open, like when it plays something from mopidy, or if I open pavucontrol. If I kill pulse it still has issues, it seems that mycroft is not using dmix?

@forslund
Copy link
Owner

Could it be similar to this: mopidy/mopidy#954

@ghost
Copy link
Author

ghost commented May 11, 2017

I start mopidy from cli as my own user, I use mopidy everyday and have yet to encounter this issue with anything other than mycroft, and still, mycroft is the only thing affected.

Does mycroft run as its own user if I run it from my home directory? I will have to check this next time I am on my linux box

@forslund
Copy link
Owner

forslund commented May 11, 2017

No mycroft should run as the current user unless it's not installed using a package manager.

You might try to use paplay instead of aplay for mycroft by editing your ~/.mycroft/mycroft.conf and setting

"play_wav_cmdline": "paplay %1"

(of you add it in the middle of a bunch of stuff remember to add a , at the end of the line)

If the file doesn't exist be ware that it's in json format so creating a new file with this parameter should look like this

{
  "play_wav_cmdline": "paplay %1"
}

Using my debian and Ubuntu systems I have had no similar issues, I should somehow get an Arch machine to test on...

@ghost
Copy link
Author

ghost commented May 12, 2017

It is not installed from pacman/pacaur, as the aur version is outdated and gave me weird issues.
I will try this now and let you know! Thanks for all your help!

Edit: Yea no that broke all sound as soon as mycroft started.

Voice log: https://pastebin.com/z675aE3e

@forslund
Copy link
Owner

Ok, apparently a bad idea =) Does paplay work from the command line?

The weird thing in the log is that it mentions jack. During my lunch break I'll have to check my log to see if I have the same message.

@john-ee
Copy link

john-ee commented Jan 31, 2018

Hello ! I am also encountering this problem with Mycroft and Mopidy using Spotify.
When i play something Mycroft does not speak anymore
I installed it on Xubuntu. In my configuration I already have paplay.
Has there any been advance on this issue ?

EDIT : I followed the link mentioned and I got it working

@forslund
Copy link
Owner

@john-ee the link to the mopidy issue? Care to add a section in the readme to document the procedure?

@john-ee
Copy link

john-ee commented Jan 31, 2018

@forslund the link you gave here mopidy/mopidy#954
More exactly I did followed the first two steps here : https://wiki.archlinux.org/index.php/Music_Player_Daemon/Tips_and_tricks#Local_.28with_separate_mpd_user.29
Then I added this to the mopidy configuration :

[audio]
output = pulsesink server=127.0.0.1

As for the radme, I never contributed to another git, should pull the repo, modify the readme then have a pull request ?

@john-ee
Copy link

john-ee commented Feb 1, 2018

hum it turns out Mycroft loses its audio as soon as Mopidy is used and if the music is lowered. Then it does not go back up.

Edit : Seems like the error happens when Mopidy start before Mycroft

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