Three backends have been added, mopidy, vlc and mpg123. Depending on uri type an apporpriate service is selected when media playback is requested. (for example mopidy service can handle spotify://... and local://...)
A playback Control skill can pause, resume, stop change track, etc any started media. So for example if the NPR news skill used this after starting playing the news the user can say "Hey Mycroft, pause" and the playback will pause. The playback control also handles stuff like lowering the volume of the playback if mycroft is asked another question.
Currently the different backend runs under the playbeck control, this was made most for convenience and the services should be moved in the future.
Usage:
The user needs to import the audioservice interface
`from mycroft.skills.audioservice import AudioService`
and initialize an instance in the skill `initialize` method
`self.audio_service = AudioService(self.emitter)`
Then playing an uri is as simple as
`self.audio_service.play(uri)`
TODO:
* Configuration (Alias for the different backends, service specific config, active services, etc.)
* Manual selection of backend (This is prepared in the audioservice interface biut not implemented)
* More feature complete audio service interface (playback control, get trackname etc)
* Separate audio services from the playback control
* Probably lots more
==== Fixed Issues ====
#926
==== Tech Notes ====
All build_host_setup_* scripts updated with versions of the
libjpeg62-turbo package
==== Documentation Notes ====
NONE
==== Localization Notes ====
NONE
==== Environment Notes ====
libjpeg-turbo62-dev will be needed as a requirement for the mycroft-core
package.
==== Protocol Notes ====
NONE
==== Fixed Issues ====
==== Tech Notes ====
Uses supplied name parameter if present, otherwise uses name of class.
==== Documentation Notes ====
The skill creation documentation should mention that the name parameter
is only an option.
==== Localization Notes ====
NONE
==== Environment Notes ====
NONE
=== Protocol Notes ====
NONE
This is because this will break wolfra alpha skill unless they update
skills, but if they update before getting the new version, it will also
break wolfram
This reverts commit 6ca4161335.
* Create new FallbackSkill base class for implementing fallback behavior
Also removes multi utterance intent fail. Only makes sense to emit an intent_failure regardless of the amount of intents
0.8.17 or earlier build. A Series of Unfortunate Events leads to two instances
of the mycroft-skills service running. This causes double-answers, which is
confusing to everyone. The root problem that lead to this is corrected in
release 0.8.18, but resolving it in packaging is ridiculously difficult.
So, we'll do this simple hack for the interim. It is harmless and useless if
not running in the Mark 1 environment.
Adds the ExtractDateTime parse function from Christopher. When imported from mycroft/util/parse.py, it'll take a sentence like "What's the weather like 5 weeks from next Wednesday?" and will extract a python datetime object for that date.
* Added requirements.txt change for importing dateutil
* Check queue empty with self.queue.empty() instead of len()
* Add error logging of exceptions in tts thread.
* Limit the number of audio_output_start messages.
recognizer_loop:audio_output_start message will only be sent if the
queue has been empty since last loop.