Emby Music Skill Update - Testing And Feedback

Hi,

first of all, thank you for this skill. This is something I have been wanting (i.e. a voice controlled Jukebox) since MP3ing my music collection 20 years ago.

One question though: the Github site say that you don’t need to include “from Emby” at the end of the utterance to get the music playing. I was unable to do this. I always need to say “from Emby” at the end. Am I making a mistake somewhere?

Thanks again for the skill!

Regards,

Stephen

@Stephen_O_Sullivan,

I’m glad to hear you are enjoying the skill!

The implementation for using the skill without adding the specific Emby utterances is pretty rudimentary. When you say ‘play {media}’ the skill will attempt to find that {artist/album/song} on the Emby server and play it. There is a timeout when using the common play framework so it is possible that if the request to search/gather the items takes too and long nothing is played.

If you can provide some logs we should be able to shed some light on what the issue might be.

Appreciate the feedback!

Thanks for the quick reply @sampsonight.

I am just after getting a new Rasp pi 4, and I am moving to that. Maybe the speed improvement on my new hardware will give be enough so I don’t see this issue again?

I’ll test tomorrow, and will feedback then.

@Stephen_O_Sullivan,

The speed issue is just a shot in the dark until we have more info from the logs. But it is most common if there is latency between the mycroft and the Emby server.

Sounds good! And happy to help!

Hi sampsonight,
I tested today, but no dice. The new hardware did not improve the situation. The Server co-exists with mycroft on the same Raspberry Pi 4 (4GB). You may be right about the response time being the issue. In the skillslog I see:

2020-02-14 18:59:22.163 | INFO | 863 | Playback Control Skill | Resolving Player for: artist blur
2020-02-14 18:59:22.174 | INFO | 863 | mycroft.util:wait_while_speaking:448 | mycroft.utils.wait_while_speaking() is depreciated, use mycroft.audio.wait_while_speaking() instead.
2020-02-14 18:59:27.310 | INFO | 863 | mycroft.skills.settings:save_settings:109 | Skill settings successfully saved to /opt/mycroft/skills/mycroft-playback-control.mycroftai/settings.json
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
2020-02-14 18:59:27.359 | INFO | 863 | mycroft.skills.settings:save_settings:109 | Skill settings successfully saved to /opt/mycroft/skills/mycroft-npr-news.mycroftai/settings.json
2020-02-14 18:59:31.773 | INFO | 863 | Emby | artist blur
2020-02-14 18:59:31.774 | INFO | 863 | root | phrase: artist blur
2020-02-14 18:59:31.774 | INFO | 863 | emby_rickyphewitt.emby_client | ?SearchTerm=artist blur
2020-02-14 18:59:31.841 | INFO | 863 | mycroft.skills.settings:save_settings:109 | Skill settings successfully saved to /opt/mycroft/skills/emby.rickyphewitt/settings.json
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
2020-02-14 18:59:32.313 | INFO | 863 | Playback Control Skill | No matches

Is there anyway I can increase the timeout value?

Thanks for the help, and have a nice weekend,

Regards,

Stephen

@Stephen_O_Sullivan,

One of the things that is not done via the common play implementation (that I’ve been thinking about doing) is looking for words like ‘artist/album/song’ and using that to further narrow down a search. Right now the full query string is used to search. I suspect that the issue is that no results can be found for the combined query of ‘artist blur’. Can you try saying ‘play blur’ and not ‘play artist blur’.

If that still doesn’t work please include the logs again.

Also I do not think there is a way to increase the timeout, however if that does turn out to be the issue there may be ways to optimize the skills implementation to respond back sooner. Right now it repsonds after it has found the media item, gathered all songs for that media item, and converted each song into a playable format. There are a fair amount of trips to the Emby server before informing the common play framework that this skill has a match.

Enjoy you weekend as well!

@Stephen_O_Sullivan,

I just added a few changes that now handle a common play request that contains artist/album/song in the phrase. You will have to install it via msm with the -l option as it is not in the mycroft repo yet. Something like msm -l install https://github.com/rickyphewitt/emby-skill should do it.

Hopefully one of these options will get you up and running :slight_smile:

@sampsonight

Thanks for the tips, and the work on the code.

Just to let you know, i took a different approach. Since I now have a raspberry pi 4, my raspberry pi 3 is sitting there doing nothing. So, I installed a fresh raspbian, and installed my Emby server on the Rasp 3. I pointed my Emby skill at that, instead of the local install, and viola, I no longer need to say “from Emby” at the end! So, it appears your theory was correct. It was the “slowness” in the Emby server response causing this problem. Distributing the load across 2 raspberry pis solved the problem.

Yes, I know this is not really the set up I wanted, but at least it’s working.

I am wondering, could disk speed be a factor here? Maybe the Emby server cannot run the Database search quick enough on my SD Card? I might test this when the SSD booting issue is fixed with the Raspberry Pi boot manager.

Anyway, the skill is working as intended, many, many thanks for the help!

1 Like

@Stephen_O_Sullivan,

Glad to hear it all works! Yea I have never tried the setup you have (mycroft/Emby on a single pi). It plausible that the timeout was seen due to a load issue. That being said there are improvements I can make on the skill side and I’ve added to an existing issue on github aptly named (CommonPlayFramework v2): https://github.com/rickyphewitt/emby-skill/issues/40

While I don’t have a lot of time to work on this now (new baby just arrived!), I hope to tackle this in the future.

If you have any other questions/suggestions/feedback don’t hesitate to let me know :slight_smile:

1 Like