I’m a first-time skill maker and a relative newbie to Python. But I wanted to create a simple skill to learn more about how to build Mycroft skills. My thought was a simple play command for playing SomaFM streams.
I’ve seen a number of radio playing skills but rather than try to get those working, I want to create a simple skill to learn.
So I used mycroft-msk to create a basic skill. I followed/reviewed the code of similar skills like news, and followed a Common Playback Framework tutorial on Mycroft’s site. The resulting skill seems to be valid, and works as expected with 1 omission: Mycroft goes to play the MP3 URL and makes no sound at all.
Here’s the logs when I trigger the skill successfully
23:30:37.332 | INFO | 203218 | Playback Control Skill | Resolving Player for: salad
23:30:44.102 | INFO | 203218 | Playback Control Skill | Playing with: somafm-player-skill
23:30:44.187 | INFO | 203218 | SomafmPlayer | Playing from: https://ice4.somafm.com/groovesalad-128-mp3
23:30:44.230 | INFO | 203218 | Playback Control Skill | Audio service status: {}
What happens is Mycroft speaks as expected, and then silence. No audio. I am almost certain that it isn’t related to Mycroft but rather my skill, because I was able to get this working with some other skills.
Any advice on how to properly get Mycroft to stream SomaFM? Should it be a CPF skill? Am I not using that correctly? Help and insight appreciated!
I went through the logging video here: Logging - Mycroft AI I’ve got all sorts of logs working and I can see that everything is working from my skill side. But I think the URL is being passed to the Mycroft code and I’m not sure what’s happening in there.
I switched to debug mode in the CLI, and see nothing being output. I’m not sure how to trace things back through the code but will be trying that next. Basically I see
20:01:27.514 | INFO | 603909 | Playback Control Skill | Audio service status: {}
and I want to understand if this is usual, how to output more about what’s going on in the Mycroft code so I can follow the flow of info.
I’ve confirmed that mycroft.conf has mpg123 as the MP3 player, and that playing the URL from the same terminal does play it properly.
So how do I dig into what’s going on in the Mycroft code? Is it just following the python rabbit hole?
@kirkb I had the same desire and idea, I think it would be pretty neat to have a SomaFM skill for my MarkII, now running Neon. Is there current documentation, community success recipe, or advice on the current “correct” way to play an audio stream off the web? ( SomaFM appears to be ICEcast, if that makes any difference).