Mycroft AI - Elisa official control skill
Open, Needs TriagePublic

Description

What with the Mycroft Integration project and the work on Mycroft AI. I'm currently wondering whether it is worth putting together a skill for Mycroft AI which would permit it to access and control of Elisa. It would then allow the user to be able to perform actions using Elisa by making use of Mycroft obviously some optional configurable secure web socket may be required or communication through DBUS.

So a user could then ask Mycroft to have Elisa play or perform some other action using the skill. The user could then ask to play an Album or Song from its library.

I unfortunately can't program in Python at the moment and are on a course to learn it but have hit a snag at the moment. So if anyone wants to jump on this they will also need to program it. When I reach the level of skill needed on Python hopefully I will be able to join in on the work.

Details

johncooper updated the task description. (Show Details)
johncooper updated the task description. (Show Details)Mar 10 2018, 2:29 AM
Aiix added a subscriber: Aiix.Mar 10 2018, 6:40 AM

It sounds like a cool idea to have Mycroft Elisa integration for voice control, If Elisa is already using Mpris 2 it should be rather easy to have Mycroft talking to Elisa over DBUS for basic actions like: play current song, pause, stop, next, previous song (example: https://github.com/AIIX/amarok-player-skill) but for a deeper integration like song name search, or play by song name match in library, play selected genre or more natural user queries like"play some song based on user mood" the integration would have to go far beyond what the Mpris DBUS interface currently provides.

Elisa does support MPRIS2, so this would be doable. Implementing the advanced features is probably quite a lot of work.

Aiix added a comment.EditedMar 10 2018, 12:09 PM

Something like "mycroft, play me a song xyz from the playlist/library" could be doable if Elisa can send over an object map with the current playlist over a Dbus callback or some type of JSON call, Mycroft handles the song name matching over an index and call play over dbus (some index that matches title/tag/artist or fingerprint matching from musicbrains) something like play me something by xyz mood would probably require song tagging within Elisa itself.

Thanks a lot for this idea. This sounds really interesting.
We currently have a minimal dbus API that is more or less the minimum needed to have mpris2 integration works and the standard interface provided by KF5::DBusAddons.
Is extending the dbus interface an easy way to integrate with Mycroft ?
I would be happy to do the needed work on the Elisa side.

I'm currently asking about this on Mycroft AI chat system.

Åke Forslund foresees no problems involved with using DBUS for integration. So we can go ahead.

johncooper updated the task description. (Show Details)Mar 13 2018, 4:18 PM
johncooper added a comment.EditedMar 13 2018, 4:21 PM

He can be contacted on this email address: ake.forslund@mycroft.ai
He has given permission for his email address to be used in regards to this.

Aiix added a comment.Mar 14 2018, 3:06 AM

Its awesome to see support for this integration I can start putting in the python side of Mycroft Elisa-control-skill together (in a scratch repo?) from my end that incorporates the existing Mpris2 interface within Elisa this will add basic voice control on the mpris calls, we could start extending the skill as Elisa expands its own Dbus Interface to interact with different parts of the application to handle complex formations, I have gone ahead and created a very rough flow chart that might be able to give a better view of how Elisa's Dbus interface could be extended to add additional functionality and how it can all come together: https://imgur.com/a/oHzk0

Feel free to assign me to this task and everyone who's going to work on this :)

@Aiix I would like to work on the Elisa part but this may take some weeks.

Your plan seems good to me. Do you want to start drafting some api ? This may help you start working on the Mycroft part.

Aiix added a comment.Mar 20 2018, 1:49 PM

@mgallien That's awesome, I've gone ahead and created a scratch repository for this with a basic skeleton at: https://cgit.kde.org/scratch/adityam/elisa-control-mycroft-skill.git/ on the mycroft skill side. This skill currently connects up with Mpris and can do the basic stuff play, pause, next, previous, stop music in current play list. As I understand Elisa is currently in heavy development and things could take a while to get moving so we can just go with the flow as and when the features come in on Elisa dbus, ill start connecting it up with the Mycroft Skill or if there's anything on your side you feel you can already connect up to a dbus interface like something basic like string search in albums,artist, charts we can start from there in the coming weeks.

I am currently looking into Elisa and taking notes on where all it would be cool to integrate and if you and anyone from the Elisa team get any cool ideas lets put them down here in this discussion so we can start working/discussing on those from both the Mycroft skills and Elisa side.