pychromecast needed to be updated to fix pip package version conflict
when using streaming google STT.
Minor issues with startup of audio needed to be handled, mainly adding
explicit waits to ensure commands would be accepted
the old "__metaclass__" has been ignored since the switch to python 3
this restores the metaclass functionality by updating it to the new
class kwarg syntax
Pulling method originally implemented in the default Mycroft skill-alarm, but useful by many for
converting a different timezone to whatever the native timezone is on the host machine.
The MycroftSkill.stop() method does not need to be implemented by the majority of skills, no reason to 'require' its implementation with an abstractmethod.
The initial framework for live streaming Speech to Text. STT derived
classes now can report that they support live streaming via their
"can_stream" property. If True, the following member functions will be
called on the object:
stream_start() - Called when a stream is starting. Should setup any
persistent state required to process speech to text.
stream_data(chunk) - Called when a chunk of audio data has been
captured.
stream_stop() - Called when a stream should be stopped. Should tear down
any state setup with stream_start(). Note that this may be called at
anytime (even if stream_start() has not been called).
Note that the execute() API is still used to get the text utterance from
the class.
A typical sequence of calls would be:
stream_start()
stream_data(...)
stream_data(...)
stream_data(...)
stream_data(...)
...
execute(...)
stream_stop()
* Handle DelayRequests when uploading blank settingsmeta
* Move Api methods to DeviceApi
This includes delete, put and get skill settings/meta
* Cache skill settings for 30 seconds
The skill settings are cached to reduce number of requests to the backend and increase skill loading speed.
* Remove _request_other_settings method
The endpoint is not used anymore
* Fix issue when the settingsmeta fails to load
Remove an old reference to "BLANK_META" left behind in the exception handler for failing to load settingsmeta.
When opt in is set and local saving of the file no mtd would be generated and the cause a undefined variable exception. This generates metadata if it's missing
* Restored ability to store wakewords locally
The code that handles the local save of wake words configuration -
"record_wake_words" - was removed some time ago. This restores that
capability.
Add the following to mycroft.conf
{
"listener": {
"record_wake_words": true
}
}
Then restart Mycroft. It should begin saving .wav files under the
/tmp/mycroft_wake_words directory.
The filename, will be filename structure is:
<accountId>_<engine>_<model>_<name>_<sessionId>_<time>.wav
* Add documentation for 'record_wake_words' and improve the doc for
'save_utterances'.
* Catch the new system.gui.user.interaction
This will in turn trigger the gui.page_interaction similar to the page flip but page_number will be None
* Fix issue when adding pages
Seems like appending would fail at times
* Add lock around namespace modifications
* Improve argument description for override_idle
* Log error when creating Padatious
* Update msm to v0.7.6
This handles connection errors during the startup procedure and improves
the skill_gid when no network is available
Padatious is registered as a FallbackSkill and was pushing settings to
the backend.
This change allows Padatious to flag to the MycroftSkill class
that no settings should be created. This is done via the new optional
MycroftSkill parameter use_settings.
When the mimic2 TTS instance is created the phrases from mycroft-core and mycroft-wifi setup (if available) is generated and stored locally (defaults to /opt/mycroft/preloaded_cache but can be changed with the mimic2 config parameter "preloaded_cache"
On startup the cache will be copied into the cache directory to speed up default interactions.
Mycroft-core won't retry for 5 minutes on a 422, 500 or 501 error.
This adds a DelayRequests Exception which will cause the settings
fetching Timer thread to sleep for 5 minutes
* Set default log level to INFO
* Restore echo functionality
- Make sure that the mycroft.debug.log message isn't removed by the
whitelist
- whitelist now only checks the beginning of a message so a whitelisted
"mycroft.audio.service" will allow messages such as
"mycroft.audio.service.play"
* Make MycroftSkill.log track root logger
modify root logger when changing log level will now change the log level
of the skill logger.
* Changes for debugging
* Switched bus logging to use INFO instead of DEBUG so it always displays when turned on
* Add exception output
* Replaced multiple calls into a msg_type variable
The simple audio service can be paused. The audio is "paused" but placing the
audio playback mechanism (usually aplay or mpg123) into the background, kinda
like hitting Ctrl+Z. While in the background that process can no longer react
to the SIGTERM signal. So paused audio has to be brought to the foreground
using SIGCONT, and _then_ sent SIGTERM.
Also added a belt to go with these suspenders and perform a process.kill() if
the audio process doesn't go away after 1 second.
The message returned is a dict of all available audio backends as keys
containing 'supported_uris' listing supported uri types (file:// http://
etc.), 'remote' (bool) True if remote), 'default' (bool) true if the
default audio backend.
Revert "Fix a couple of minor issues intruduced by skill_gid (#2079)"
This reverts commit e046377ce1.
Revert "Merge pull request #2075 from forslund/bugfix/msm_wrapper-license"
This reverts commit 18cfbce0ca, reversing
changes made to 82fa314ce9.
Revert "Feature/skillsmeta gid (#2074)"
This reverts commit 82fa314ce9.
* Fix skill_gid for modified skills
Used the old '_' after device uuid
* Identify skill using gid
When receiving data from server the "identifier" entry is now removed and in it's stead the skill_gid should be used.
This also removes the "fetch other settings" functionallity since that is no longer relevant.
* Add global id basics to settings meta
- All skills will upload a blank settingsmeta
- a skill_gid will be appended to all settingsmeta upload-data
- Added basic function for generating skill_gid
* Use new skill_gid field.
Populate skill_gid directly from metadata
* Separate travis tmp-dirs
- Update travis script to use tempdir for each python version
- Update test script to handle nonstandard tempdirs
- Generate msm folder using tempdir when running create_msm test
* Add title field with pretty name
* Collect and expand "title" as needed
For title use market-place title or name in settings meta or skillname
* Switch skill_manager create_msm test to 19.02
* Remove leading / trailing Skill in display name
Also rename title displayname to match new mycroft-skills-data
* Lock msm_create and mock the name info test_settings
If no match was found for the non-normalized utterance it would jump to
the exception handler for StopIteration skipping the normalized step
altogether
This changes the next/StopIteration system for list comprehensions
Previously Padatious intent matches were performed on non-normalized text, meaning that things like "what's the weather" wouldn't match a Padatious intent but
"what is the weather" would.
The "utterance" in Adapt intent data will still be non-normalized even if the intent match occurred on a normalized utterance. Retaining the existing behavior.
The "intent_failure" data. In there, "utterance" is always the raw version, "norm_utt" is the normalized one.
Also added better debugging info for intent matching to the log.
Also addresses a rare issue with the old code where the Adapt context could
have been updated even if the Adapt intent wasn't actually invoked due to
a higher Padatious intent match.
* Add the SkillGUI method send_event()
Sends raw mycroft.events.triggered messages to the gui for the skills namespace.
Example usage:
self.gui.send_event('event_name' {'param1': 12, 'param2': 'abc'})
* Fix mimic 2 long sentences
Fixes bug in the second and third chunking pass incorrectly by
concatinating strings with lists resulting in chunks of single
characters.
* Handle mimic2 chunking correctly
- Move preprocessing from get_tts() to a method called from tts execute,
this allows all parts to be spoken and the caching to work correctly
- Remove duplicate of phonetic spelling in mimic2_tts
The loose (conf > 0.5) Padatious match was previously occurring as Fallback
priority 99. The AIML fallback at priority 90 would consume lots of
utterances, interferring with many skills. Now Padatious runs at priority
89.
Additionally, added documentation of the intent and fallback system, including
guidelines for priorities.
Much of the code used "en-us" as the default value when not specified.
This limited the internationalization potential. Changing the default
to None and adds the ability to define the default lang code from other
locations in code. E.g.
```python
from mycroft.util.lang import set_default_lang
set_default_lang("en-us")
print("English date: "+nice_date(dt))
set_default_lang("de-de")
print("German date: "+nice_date(dt))
```
This allows easier localization of Skills by having the framework set the default without any changes necessary by the Skill writers.
Other minor changes:
* Changed the default return value of get_gender*() to None instead of False
* Split ADJUST into ADJUST and SET
* Use enum names instead of values.
* Add properties to CommonIoTSkill
* property -> attribute to avoid conflict with builtin
* Add increase and decrease actions
* Fix copy/paste error
The restore_volume would previously unpause the service even if the user just asked for pausing playback.
This separates the paused flag from the pausing/resuming action so lowering/restoring volume doesn't affect the logical pausing state and can check it to determine if lowering/restoring is needed/wanted.
This adds a very simple mechanism for pausing and resuming audio streams
that are actively playing. The process is suspended and resumed when
requested.
This also uses that same method to implement lower_volume()/restore_volume() for simple "ducking" of audio.
Mimic2 voices has several issues:
* Numeric generation was all goofed up for decimal numbers. It was
independently doing number to speech for the values before and after
the period on a decimal number. E.g. 1.100 became "one.one hundred".
Removed local normalization altogether since it is handled
correctly on the Mimic2 server now.
* Sentence splitting was being applied in the middle of things like
numbers or abbreviations. E.g. "I.B.M."
* Chunker algorithms were making unnecessary copies of string arrays
While in there I also:
* Removed several unused imports
* Cleaned up docstrings
* Prefixed private helpers with _
* Added debug logging of mimic2 request text
Padatious was accepting fairly low confidence matches (0.5). This
would match a phrase such as "Where is the Empire State Building?" to the
intent "Where were you born?" (Which is a 0.54 match)
Now there are two passes mad on the Padatious fallback. The first is
looking for high confidence matches (> 0.8). Then other fallbacks -- such
as the CommonQuery fallbacks -- have an opportunity to consume the
utterance. If they don't consume it, Padatious is invoked again with
looser confidence before finally invoking the Unknown fallback.