Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Audio service #433
Conversation
aatchison
assigned
jdorleans,
aatchison,
penrods and
augustnmonteiro
Dec 28, 2016
|
Major refactoring done after discussion with @ethanaward. The audio backends now runs separately from the skills. The loading of backends is now done using a method similar to how the skills work and should be easy to extend to include thirdparty backends. |
|
Skills using the audio service interface most important, the playback control skill: The playback control skills implement the common commands for skills using the audio service. like skipping tracks, pausing and resuming. The idea is that the skill creator only needs to implement the finding of audio files and the command that starts playback. (The other commands are of course available to the skill creator if they wish to use them) |
augustnmonteiro
added
status: in review
status: waiting for conflict fix
type: feature
labels
Apr 26, 2017
augustnmonteiro
self-requested a review
Apr 26, 2017
coveralls
commented
May 1, 2017
coveralls
commented
May 16, 2017
forslund
removed
the
status: waiting for conflict fix
label
May 16, 2017
coveralls
commented
May 25, 2017
|
Finally rebased, phew |
| + logger.info('no default found') | ||
| + logger.info('Default:' + str(default)) | ||
| + | ||
| + ws.on('MycroftAudioServicePlay', _play) |
augustnmonteiro
May 25, 2017
Member
please change to mycroft.audio.service.play like the others mycroft events
coveralls
commented
May 25, 2017
coveralls
commented
Jun 9, 2017
coveralls
commented
Jun 14, 2017
coveralls
commented
Jun 15, 2017
coveralls
commented
Jun 15, 2017
coveralls
commented
Jun 15, 2017
coveralls
commented
Jun 16, 2017
coveralls
commented
Jun 20, 2017
|
Let's rebase and wait finish the new release to merge it |
augustnmonteiro
added
status: waiting for conflict fix
and removed
status: in review
labels
Jun 30, 2017
coveralls
commented
Jul 1, 2017
forslund
removed
the
status: waiting for conflict fix
label
Jul 4, 2017
|
Let's get this merged after the next (July 6th) release. |
coveralls
commented
Jul 6, 2017
coveralls
commented
Jul 7, 2017
|
@forslund can we merge this one? |
|
Fixed the conflict it should be good to merge now. |
coveralls
commented
Jul 14, 2017
ethanaward
added
the
tagged for review and potential merge
label
Jul 17, 2017
coveralls
commented
Jul 25, 2017
forslund
added some commits
Dec 2, 2016
coveralls
commented
Jul 31, 2017
|
So why isn't this merged yet! Reviewed by Augusto, merge away! |
forslund commentedDec 25, 2016
In late November @penrods led a discussion about how an audio service in Mycroft could work. This is a simple implementation of what was discussed. This is a quick implementation of the system as I understood it and I think this can be used to continue the discussion. Ideas and suggestions on improvements are very welcome.
The PR adds support for commands like
"Hey Mycroft, play the news in the livingroom"
Backends
The current system includes support for the following "backends"
"backends" currently in the works:
Backends are quite easy to add and an existing baseclass can be extended to add new ones.
AudioService
Skill creators will use an audio service interface to communicate with the audio service / playback control. the AudioService interface uses the standard message bus.
See the npr_news skill for basic usage.
The AudioService currently only support play and track_info requests but this will probably be expanded for increased usefulness.
Playback control skill
Features:
The backend/location selection is currently done using basic string parsing and should probably be done using adapt instead.
This skill removes much of the basic functions that needs to be implemented for an audio playback skill and the skill creator can focus on the trickier parts.
Currently most of the audio logic is implemented in the playback control skill and should maybe be moved but this was a good starting point.
Configuration
A Configuration the audio services:
{ "Audio": { "backends": { "local": { "type": "mpg123", "active": true }, "kitchen": { "type": "mopidy", "url": "http://localhost:6680", "active": true }, "livingroom": { "type": "mopidy", "url": "http://192.168.10.232:6680", "active": false }, "vlc": { "type": "vlc", "active": true } }, "default-backend": "local" } }If you try it I suggest you install vlc and pyvlc and use the vlc backend since mpg123 only has basic functionallity.
I've tested this mainly with the mopidy skill and the npr_news skill.
Todo