Emby Music Skill Update - Testing And Feedback

Awesome!
Regarding the Tune In skill, I’m not sure what its intents are and/or if it uses the common play framework. I’ll look into install the Tune In skill on my mycroft and see if there are any interoperability improvements that can be made.

Looking at the TuneIn Skill our common play framework is implemented a bit different. The emby skill attempts to search emby for items related to the search, if found the skill will attempt to determine the type Artist/Album/Song and then apply weights on them. If no matches are found the skill returns None, if an album or artist is found CPSMatchLevel.Title/CPSMatchLevel.Artist are returned. The tuneIn skill uses regex to determine if the utterance is meant for tuneIn with a default ofCPSMatchLevel.Generic. I think there are improvements that can be made to the emby skill to provide a better common play experience. I’ve added a github issue to capture any work around updating the Common Play Framework experience in the emby skill: https://github.com/rickyphewitt/emby-skill/issues/40
While I don’t think this functionality is needed to update the skill to its current version in the mycroft skills repo I do agree that as more and more skills start to adopt the common play framework this part of the skill will become ever more important.

1 Like

Can no longer configure this skill via https://account.mycroft.ai/skills. All that is listed is:

Emby

Devices

This skill is installed on all devices

I installed via ```
msm -l install https://github.com/rickyphewitt/emby-skill

It looks like there’s a slight problem with the settingsmeta file. Need to rename that from settingsmeta.json to settingsmeta.yaml

Also remove the / on line 18 where it says “Username/password”, maybe replace that with “and”

Then the settings block should display in Home.

Thanks for the info! I’ll make the change shortly.

1 Like

@gamersat678,

I’ve updated the code as @gez-mycroft suggested and I can now configure the skill again. Update the skill and you should be able to configure it as well.

If possible please provide feedback on your experience with the skill. Currently the skill version offered in the mycroft marketplace is many version behind and I’d love to get an updated version in.

Let me know if you run into any issues.

1 Like

Tried a msm update and it said no update. Purged emby by using
msm remove emby
Still using an old versions number? Terminal listed this:
Best match (1.0): emby by rickyphewitt
Installed using the -l method and was able to properly configure it on the Mycroft website. You can stream music using your skill. Add a .strm to your library (https://github.com/MediaBrowser/Wiki/wiki/Strm-files). Mentioned it in my other post figured I’d post it here too. Kinda cool. Seemed to have trouble playing an AAC encoded stream, nothing came out of my speakers. Was able to play it on my main Mint distro using Firefox and the Emby server. I’ll look into it a little closer when I get my 2nd Mycroft Device for the bathroom/bedroom in a week or two. I’ll probably end up using it at least once a day for the foreseeable future. I’ll let you know what I find.

2 Likes

@gamersat678,

Thanks for the update, I appreciate the feedback! I don’t have any AAC encoded media files so any additional details you can provide would be great. I can always convert one of my mp3 or flac files into AAC as well to see if it is a problem with skill or something else.

If you think of improvements that would make using the skill better/more intuitive please add those to github :slight_smile:

Probably has to do with the default sample rate and possible related resample method configured within pulse audio.

Old information, but perhaps gives you the pointers to dig into it;

I can’t get the intent to trigger. Mycroft thinks I want to play “from md” and “from mb”. Male, native English speaker, western U.S. is anyone else having this problem?

Hello @jrwarwick,

The skill should cover the ‘mb’ case but I don’t think it covers the ‘md’ case. Can you provide logs after attempting to play music from the skill? That should help narrow down any issues.

Thanks!

Scratch that, sorry. Maybe I tried utterance too soon or something. Now, while I do have some trouble still getting Mycroft to “hear” “mb”, I have that now, and the intent is triggered. However, now I am seeing this in the log:

17:21:41.708 | INFO     |  5061 | mycroft.client.speech.__main__:handle_utterance:64 | Utterance: ['play blue man group from mb']
Removing event mycroft-mark-1.mycroftai:IdleCheck
17:21:42.097 | INFO     |  4969 | Emby | {'media': 'blue man group', 'utterance': 'play blue man group from mb'}
17:21:42.097 | INFO     |  4969 | Emby | failed to connect to emby, error: __init__() takes 4 positional arguments but 6 were given
17:25:32.010 | INFO     |  4969 | mycroft.skills.settings:_emit_settings_change_events:411 | Emitting skill.settings.change event for skill emby|19.08
17:25:35.498 | INFO     |  4969 | mycroft.skills.mycroft_skill.mycroft_skill:handle_settings_change:278 | Updating settings for skill Emby

(oy, reedited too soon)
Still having this arguments count mismatch problem

Ok so the skill is being invoked, that is good. I have yet to see that error before. What does your config look like on home.Mycroft.ai? I see there was a config change after the error.
Also say ‘check mb’ and let me know the output. This will run a test to see if the skill can connect/auth to the server and may provide additional information.

Well, scratch all that. After a git pull, and an unexpected power outage, I found Emby skill settings were blank again. I filled it in, and the check worked, and then playing a couple albums, one by artist name, one by album name worked.
Very cool! Thanks for your work and help.
Just FYI, I used the quick-n-easy Windows-based Emby server package and the mycroft instance is a mark I.

1 Like

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!