I have picroft running on a rpi 4 with an amp hat. System audio works perfectly, both input and output. However, when I try to use some of the audio skills (Emby and Pandora), playback begins but I get no sound. This is not a problem for other skills (such as Podcasts, which works perfectly). As part of my install I changed the system default output device to the HAT, but that is the only audio setting I have messed with.
I think the error about py_mplayer is the issue, that the skills use py_mplayer for playback but podcasts/the system don’t? I’m not really familiar with how picroft is set up.
Mplayer is phased out by now, this isn’t the issue. “simple” is the default audio service and since the skill isn’t specifically hammering down another service, this is the one that is called. Mycroft only preloads existing audio services at this moment. The stopped stream is likely caused by
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/pi/mycroft-core/mycroft/audio/__main__.py", line 73, in <module>
main()
File "/home/pi/mycroft-core/mycroft/audio/__main__.py", line 69, in main
audio.shutdown()
File "/home/pi/mycroft-core/mycroft/audio/audioservice.py", line 473, in shutdown
self.bus.remove('mycroft.audio.service.play', self._play)
File "/home/pi/mycroft-core/mycroft/messagebus/client/client.py", line 213, in remove
self.emitter.remove_listener(event_name, func)
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 136, in remove_listener
self._events[event].pop(f)
KeyError: <bound method AudioService._play of <mycroft.audio.audioservice.AudioService object at 0xb38d0df0>>
since _play thrown this error. Maybe @forslund can shed some light on this.
Yet the logs also show errors with timezonefinder and wolfram (not related) wich is worth inspecting
Thank you for pointing that out … installing the dependencies for wolfram and dateandtime via pip actually seems to have fixed the playback issue for pandora. I’m getting a new error for emby but that seems to either be a skill-specific issue or a configuration issue:
If anyone has any ideas I’m all ears, but I think I’m going to make a separate thread and ping the skill author since this seems to be a problem with that specific skill.
OK, so this actually may or may not be a skill issue. Most of my music is in FLAC, so when I was testing with random stuff playback didn’t work, but also no errors. I do have a few mp3s, so I tried one as a test and it played perfectly! So it’s an issue with flac playback through simple audio.
Is this an issue with the emby skill being hard-coded to call mpg123 to resolve the media stream? Or is there a larger issue with flac support on picroft? I could theoretically have the emby server transcode the stream but that would defeat the purpose of having all of my music in lossless …
Figured it out! I set VLC as the default, but that didn’t work. However, looking over the python for the skill, the skill assumes the files are mp3s by using the “stream.mp3” handler. I attempted to use the generic “stream” handler, but VLC wasn’t able to determine what format it was. For the time being I’m going to leave it with the “stream.flac” handler, since that’s 90% of my music. In the meantime, I’m going to look into the new stream api that emby has and push an update to the skill when I’ve got it figured out.
Thank you for helping me get to the bottom of this!