Commit Graph

16 Commits (363372cd26e114db023c77e02b119fc40ecf920f)

Author SHA1 Message Date
Anu 482f1b1619 Fix #1194 2017-11-02 08:57:54 +09:00
penrods 8f2e5d9498 Change to Apache 2.0 license from GPLv3.0
This commit officially switches the mycroft-core repository from
GPLv3.0 licensing to Apache 2.0.  All dependencies on GPL'ed code
have been removed and we have contacted all previous contributors
with still-existing code in the repository to agree to this change.

Going forward, all contributors will sign a Contributor License
Agreement (CLA) by visiting https://mycroft.ai/cla, then they will
be included in the Mycroft Project's overall Contributor list,
found at: https://github.com/MycroftAI/contributors.  This cleanly
protects the project, the contributor and all who use the technology
to build upon.

Futher discussion can be found at this blog post:
https://mycroft.ai/blog/right-license/

This commit also removes all __author__="" from the code.  These
lines are painful to maintain and the etiquette surrounding their
maintainence is unclear.  Do you remove a name from the list if the
last line of code the wrote gets replaced?  Etc.  Now all
contributors are publicly acknowledged in the aforementioned repo,
and actual authorship is maintained by Github in a much more
effective and elegant way!

Finally, a few references to "Mycroft AI" were changed to the correct
legal entity name "Mycroft AI Inc."

==== Fixed Issues ====
#403 Update License.md and file headers to Apache 2.0
#400 Update LICENSE.md

====  Documentation Notes ====
Deprecated the ScheduledSkill and ScheduledCRUDSkill classes.
These capabilities have been superceded by the more flexible MycroftSkill
class methods schedule_event(), schedule_repeating_event(), update_event(),
and cancel_event().
2017-10-04 01:28:44 -05:00
Matthew D. Scholefield 5e392f34aa Optimize imports
Remove unused imports and group local vs external alphabetically
2017-09-18 16:07:50 -05:00
Åke Forslund 9c49f97421 Audio service is_playing property 2017-07-31 13:37:18 +02:00
Åke Forslund 6f37d3c8f8 Fix bug in track_info_method
* import Message to allow audio service to reply info
* Add default message to audio service class
2017-07-31 13:37:18 +02:00
Åke Forslund 839803c958 Rename messages.
As requested by Augusto Monteiro
2017-07-31 13:37:17 +02:00
Åke Forslund 86a557e1ac Docstrings! 2017-07-31 13:37:17 +02:00
Åke Forslund c81ad57ebf Populate AudioService class with more methods
Pause, resume, next and previous added to the interface.
The play method was updated to add 'file://' to uri's lacking uri type.
2017-07-31 13:37:17 +02:00
Åke Forslund 5c874677cc Add check for valid type of tracks 2017-07-31 13:37:17 +02:00
Åke Forslund 3001dd5a83 Move backend base class to audio/services 2017-07-31 13:37:17 +02:00
Åke Forslund 67502372bf fix pep8 issues 2017-07-31 13:37:17 +02:00
Åke Forslund ee5141ed6f Make all audio backend build on the base class
Abstract base class is now a bit more lenient
2017-07-31 13:37:16 +02:00
Åke Forslund 06a9eb7ee5 Initial update to follow changes in mycroft 2017-07-31 13:37:16 +02:00
Åke Forslund 26e63cdff3 Add abstract base class for audio backends 2017-07-31 13:37:16 +02:00
Åke Forslund 717c6fa49b Add track_info to audio service connection 2017-07-31 13:37:16 +02:00
Åke Forslund 89adf6e8ac Initial commit of audio service
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
2017-07-31 13:37:16 +02:00