Chromecast can be manually added with a backend entry with type set to "chromecast" or the service can autodetect all chromecast and register them with their names by setting the Audio configuration parameter autodetect-chromecast set to true.
Currently this implementation is very basic and is using the default media controller. This limits the usable uri's to http(s), adding support for local files and hopefully more services will be added later.
The user can now specify which backend to use to play media. default the keywords are the name of the backend (vlc, mpg123, mopidy) but can be set with the config.
Example:
audio.mopidy.name = "livingroom"
A possible user interaction might be
- "Hey mycroft, play the news in the livingroom"
The detection is very basic and not very elegant but works as a proof of concept.
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 ====
==== 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.
* Implementing changes to out-of-the-box experience, providing an "onboarding" process.
* Added a mycroft.api.is_paired() method
* Added mycroft.util.is_speaking and mycroft.util.wait_while_speaking() methods
* RESET now waits for the spoken notice to complete
* Stopped the "Checking for updates" and "Skills updated" prompts (commented out for now, probably will eliminate)
* Wifi setup filters out hidden ("x00") networks
* Visemes should keep up better if they get behind (will skip)
* Mimic is now searched for on the users path
* Onboarding process:
- wifi setup starts automatically
- User is walked through the process
- wake word and button pressing are ignored
- At end, a short tutorial is given
* Fixing pep8 whitespace errors... grrr
* Typo in onboarding changes prevented pairing for auto-starting
The command "pair my device" needed to be sent as an array, ["pair my device"]
* Added a mycroft.api.is_paired() method
* Added mycroft.util.is_speaking and mycroft.util.wait_while_speaking() methods
* RESET now waits for the spoken notice to complete
* Stopped the "Checking for updates" and "Skills updated" prompts (commented out for now, probably will eliminate)
* Wifi setup filters out hidden ("x00") networks
* Visemes should keep up better if they get behind (will skip)
* Mimic is now searched for on the users path
* Onboarding process:
- wifi setup starts automatically
- User is walked through the process
- wake word and button pressing are ignored
- At end, a short tutorial is given
Ignoring SIG_CHLD can be convenient but parts of the python standard
library relies on the behaviour of SIG_CHLD and will not work correctly
in this configuration.
There are several issues with the changes recently made to break out
Skills from mycroft-core.
* The subdirectory mycroft/skills/intent/ is left behind when you do
a pull, so the change to core.py that tries to
"import mycroft.skills.intent" gets confused. I renamed the file
intent.py to intent_service.py
* Added a bunch of comments
* Made a bunch of functions "private", using the leading _
* The MSM install was failing. Still working on that, but we should
probably make msm.sh a part of mycroft-core instead of its own
repo.
* Restored some mycroft.conf values that I noticed got lost during
an automatic merge.
This limits WolframAlphaSkill to only query WolframAlpha when the utterance doesn't match an intent (calling the fallback handler) and it contains an obvious question phrase.
if expect_response flag is set to True the stt will be triggered just as if the wakeword has been received or the button on the mycroft enclosure has been pressed.
* intent_failure message now carries along the utterance's lang code
* normalizing query for Wolfram Alpha
* added normalization of "whats" to "what is". This is technically incorrect ("whats" means more than one instance of "what", as in "the whats and whys of open source"), but that is a rare phrase. Unfortunately, several STT engines incorrectly output things like "whats 8 + 4", which is grammatically incorrect. So we'll handle the common and potentially screw up the uncommon.
* more parsing test cases, including a few corrections
The utterance is now placed on the bus along with its language code. If not specified, it uses "en-us".
Added a new mycroft.util.parse module. It contains the normalize() function. Normalization currently does two things:
* Expands contractions ("they're" -> "they are", etc)
* Optionally removes articles ("a", "an", "the"). Removing is the default.
* Textual numbers become digits, up to 20. E.g. "What is the weather in four days" becomes "What is weather in 4 days".
NOTE: This is potentially a breaking change! Remove "the", "a" and "an" from your .voc files!
Skill changes:
* I cleaned up the .voc files for the default Skills.
* Split the date_time keyword into an extra entity. Now a "QueryKeyword.voc" exists, with "what|tell" instead of combing that into "what is time" in the TimeKeyword.voc.
* Volume skill now accepts 1-11, e.g. "turn volume to 11"
For the Weather Skill:
* When talking about the current city, the city name is generally not spoken (more natural)
* A "pretty" name of just the city is used instead of the complete name
* Works around the recurring issue with OWM where they report bad min/max temps (same as the current temp)
* Changed "Location is not valid" to "I don't know that location" (people don't say "not valid")
For the Time Skill:
* The timezone is extracted from the device location setting
* Time responses are more varied and shorter
This change adds MycroftSkill.location_pretty and MycroftSkill.location_timezone properties.
- Implementing shutdown method to cancel activator thread
- Setting daemon to activator
- Creating activator in an isolated method to avoid duplication
Add cleanup procedure to skills:
MycroftSkill cleanup does nothing, ScheduledSkill will cancel running timers to make sure it's not blocking termination.
Tests updated to use this allowing unit test to exit after completion.
- Adding proxy flag to be used in WA and OWM skill
- Integrating Tartarus login session
- Refactoring OWM to use Tartarus api and removing owm repackaging
- Fixing WA data response
* added ip address display
* added ip address display
* added sleep for timing
* altered timing
* further increased sleep time
* altered logic
* pep8
* changed delay duration to depend on ip length
* updated sleep time
* updated sleep time
* updated sleep time
* pep8
* Add media base class
* Clean up media base vocabulary keywords
* Rename header for common MediaSkill settings to "MediaSkill"
* Stop procedure cleaned up
* mycroft.media.stop now contains information of the message origin, this is used by the handler to make sure the calling skill doesn't stop itself.
* the play() method was renamed before_play() for clarity
* Rename _set_sink to something understandable.
* Added new compiled regex for what's
This is for verbs that don't have a space between the question word and verb
* Added support for 'whats' in wolfram
* Added tests for the EnglishQuestionParser
* Removed the 'I am searching for' message
* The interpreted question is now read instead of 'Sorry, I did not understand your request'
* Added rephrased question to the other areas where wolfram fails
* Fixed wolfram fail_response error thanks to ethanaward
* Added thinking animation
* Issues 192 - WA skill will now search again with top alternative
* Issues 192 - Add tests for new method
* Issues 192 - Fix pep8
* Issues 192 - Update test syntax
* Issues 192 - Change WA skill to use dialog
* Issues 192 - Address feedback
* Issues 158 - Update ScheduledSkill time formatting
* Issues 158 - Add unit tests for new method changes
* Issues 158 - Change to not use date-based implementation to fix tests
* Issues 158 - Address feedback
* added mouth spelling
* spell word after talking
* removed speech to test
* test
* re-added speech
* used emitter
* mycroft/skills/spelling/__init__.py
* emitters 102: intermediate emitters
* emitters 103: importing the right method
* trying enclosure methods
* more fixing
* sorry slack
* added brief pause
* added api listener method
* fixed syntax
* further edited syntax
* slightly changed syntax
* added brief pause before listener reactivation
* changed ordering
* testing method
* further tests
* test test test
* logger
* further logger
* altered logic
* i really need to fork
* more debug
* changed boolean logic
* more debug
* fixed it??
* added brief pause again
* final commit
* test
* test
* fixed it
* sleep
* more testing
* stuff
* added constants:
* pep8
In testing Mycroft very seldom understands "stop alarm" and "end alarm" so I have removed them from the stop dialog in order to ensure Mycroft advises users as to the best way to disarm an alarm.
Tested with new alarm, it sounded distorted. Looked at implementation of other sounds (news skill), and decided to try with MP3. Changed to using MP3 instead. Everything works properly now, tested on multiple devices.
The 1980s birthed a new form of interaction between computers and users. For the first time computers became capable of understanding the most basic form of human communication - pointing and grunting. The mouse and the GUI revolutionized computing and made computers accessible to the masses.
We have now entered a third era. We are rapidly approaching a time when computer systems will understand human language and respond using the most natural form of human communication – speech.
This is an important development. Some might even call it revolutionary.
Despite its importance, however, the technologies that will underpin this new method of interaction are the property of major tech firms who don't necessarily have the public's best interests at heart.
Not anymore.
Meet Mycroft – the worlds first open source natural language platform. Mycroft understands human language and responds with speech. It is being designed to run on anything from a phone to an automobile and will change the way we interact with open source technologies in profound ways.
Our goal here at Mycroft is to improve this technology to the point that when you interact with the software it is impossible to tell if you are talking to a human or a machine.
This initial release of the Mycroft software represents a significant effort by the Mycroft community to give the open source world access to this important technology. We are all hoping that the software will be useful to the public and will help to usher in a new era of human machine interaction.
Our community welcomes everyone to use Mycroft, improve the software and contribute back to the project. With your help and support we can truly make Mycroft an AI for everyone.
Joshua W Montgomery – May 17, 2016