Commit Graph

2324 Commits (0faa2a4451d64571f81874bc9cd27a256a436564)

Author SHA1 Message Date
Åke 3b697519d0 Make sure help section shows everything (#2151)
- Use entire screen height
- Correct page number calculation
- Add constants to improve code readability
2019-06-20 17:04:08 -05:00
Chris Rogers a40218da18 Add lock/unlock actions 2019-06-20 12:02:34 +02:00
Chris Rogers 395c31cf29 Fix pep8 issues 2019-06-20 12:02:34 +02:00
Chris Rogers e1a2de7046 Add locate 2019-06-20 12:02:34 +02:00
Chris Rogers c966dbe5bd Add basic state support 2019-06-20 12:02:33 +02:00
Chris Rogers 44d51d15f3 Add speak support 2019-06-20 12:02:33 +02:00
Chris Rogers 3602ff8e87 Begin support for state queries 2019-06-20 12:02:28 +02:00
Åke Forslund 62b115e22c Update pychromecast to 3.2.2
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
2019-06-20 08:59:27 +02:00
Åke Forslund 5211e51ec0 Remove requirement for seek_methods 2019-06-14 13:42:34 +02:00
Åke Forslund 39c844a257 Update old style metaclasses
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
2019-06-14 12:56:48 +02:00
David Wagner 4aab06d94a Docstrings 2019-06-13 09:52:31 -05:00
David Wagner d962240405 PEP8 2019-06-13 09:13:41 -05:00
David Wagner e9f68fea55 Only import google-cloud-speech if GoogleCloudStreamingSTT class is used. 2019-06-13 08:51:16 -05:00
David Wagner b585b3bd1b Merge branch 'dev' into feature/google-streaming-stt
# Conflicts:
#	mycroft/client/speech/listener.py
2019-06-13 08:31:44 -05:00
David Wagner 5f18b12617 Add back self.text 2019-06-13 07:17:08 -05:00
David Wagner 89a9ea16e2 Whitespace! 2019-06-11 17:41:06 -05:00
David Wagner bd2c1d802d PEP8 and remove fallback_stt 2019-06-11 17:35:50 -05:00
David Wagner d3c9ca4161 Remove comments 2019-06-11 17:32:21 -05:00
David Wagner 85931f43fc Google imports 2019-06-11 17:01:02 -05:00
David Wagner ab3c75f1f8 Google streaming 2019-06-11 17:00:47 -05:00
David Wagner 20d58e5724 DeepSpeech streaming 2019-06-11 17:00:16 -05:00
David Wagner c9dc14d528 StreamThread and StreamingSTT abstract classes 2019-06-11 16:59:45 -05:00
Åke aa70acd3f9
Merge pull request #2152 from forslund/feature/skill-manifest-safety
Skill manifest upload checks
2019-06-11 22:22:58 +02:00
Åke 604867201c
Merge pull request #2158 from MycroftAI/feature/time-to-system
Add mycroft.util.time.to_system()
2019-06-11 17:19:27 +02:00
Steve Penrod d80081d6b6 Remove unused subprocess module 2019-06-10 22:43:39 -05:00
Steve Penrod 5fb204fa1c Add mycroft.util.time.to_system()
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.
2019-06-10 22:38:33 -05:00
David Wagner 22fc377086
Merge pull request #2149 from JPEWdev/feature/streamingstt
Feature/streamingstt
2019-06-10 21:10:06 -05:00
David Wagner a5526410c0
audio -> message rename 2019-06-10 20:59:10 -05:00
David Wagner 16248ee313 Initial Google Streaming STT implementation off of PR 2149 with dev logs scattered about 2019-06-10 17:32:38 -05:00
Steve Penrod 8ca4bb8343
Remove abstractmethod for MycroftSkill.stop()
The MycroftSkill.stop() method does not need to be implemented by the majority of skills, no reason to 'require' its implementation with an abstractmethod.
2019-06-10 13:15:59 -05:00
Joshua Watt 7bbfe0c9fb Add Streaming DeepSpeech Server STT Backend
Implements a STT backend for a DeepSpeech server that accepts streaming
requests. For example: https://github.com/JPEWdev/deep-dregs
2019-06-09 22:28:09 -05:00
Joshua Watt 601eeb6bdc Implement streaming STT framework
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()
2019-06-09 22:28:09 -05:00
Chris Rogers d71f67f7ea Allow scheduling events a fractional number of seconds in the future 2019-06-09 22:13:44 -04:00
Åke Forslund f5aec8566d Handle badly formatted skills.json data
- Handle missing blacklist field
- Handle missing skills field
- Raise error if input is of incorrect type
2019-06-09 11:20:03 +02:00
devs-mycroft bac5c76398 Version bump from 19.2.11 to 19.2.12 2019-06-06 11:49:35 +00:00
Åke 626c69bc1d Skill settings cleanup (#2140)
* 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.
2019-06-05 18:45:15 -05:00
Åke 72ceed4377 Fix usage of mtd before assignment (#2145)
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
2019-06-05 18:43:45 -05:00
Steve Penrod 115bf77763 Restored ability to store wakewords locally (#2141)
* 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'.
2019-05-31 16:07:50 +02:00
Aditya Mehra b08f090131 Add System QML support for HTML displays (#2138)
Add SYSTEM_HtmlFrame support for html-url and html-raw and override option for all system qml displays
2019-05-31 12:59:46 +02:00
Åke 6357513970 GUI updates (#2114)
* 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
2019-05-31 03:44:09 -05:00
ChristopherRogers1991 b5279e480b
Merge pull request #2133 from forslund/feature/yaml-loader
Use SafeLoader to load settingsmeta yaml
2019-05-27 06:57:46 -04:00
Åke Forslund 21efb0fd69 Use yaml.safe_load() to load settingsmeta yaml
safe_load limits the amount of custom methods that can be supplied with
the yaml and supports the basic yaml features.
2019-05-27 12:25:42 +02:00
devs-mycroft ea9a7661fa Version bump from 19.2.10 to 19.2.11 2019-05-23 19:38:24 +00:00
Åke b1348de6f7 Feature/msm 0.7.6 (#2136)
* 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
2019-05-23 10:16:37 -07:00
Åke 86df2cefd4 Don't create skill settings for Padatious Service (#2132)
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.
2019-05-23 10:14:08 -07:00
devs-mycroft eafeecd5ab Version bump from 19.2.9 to 19.2.10 2019-05-23 00:17:08 +00:00
Steve Penrod afa3ca3215
Pass the device id as part of the refresh sequence (#2134)
Having the device uuid in the packet along with the refresh token is
useful when debugging and recovering from unusual protocol failure
scenarios.
2019-05-22 16:37:03 -07:00
devs-mycroft 68eb6ab4a2 Version bump from 19.2.8 to 19.2.9 2019-05-22 11:45:32 +00:00
Åke bf6e363812
Revert "Support chopping old audio via precise upgrade" 2019-05-22 12:52:57 +02:00
devs-mycroft cbf3c41cce Version bump from 19.2.7 to 19.2.8 2019-05-22 08:24:06 +00:00
Åke 1300773f3d
Merge pull request #2104 from MycroftAI/feature/skill-gid
Feature/skill gid
2019-05-22 06:19:37 +02:00
Åke Forslund 716c16a027 Finalize skill_gid in skills manifest.
Before sending the skills manifest to the backend attach device uuid as needed.
2019-05-21 17:47:12 +02:00
Åke Forslund c3ac9d8ca7 Remove the delete metadata calls when updating settings
The calls are not implemented and functionality will likely change.
2019-05-21 17:21:45 +02:00
Åke Forslund 2208ee178c Switch to getting skill_gid from msm skill entry 2019-05-21 09:23:02 +02:00
Åke Forslund 4518a11528 Add safety around skillMetadata
skillMetadata could be accessed in settings without it when checking if remote update was needed.
2019-05-18 08:29:26 +02:00
Åke Forslund 6eb2aefbaa Delete remote settings before pushing
- restore storing / loading uuid
- use uuid to delete before pushing settingsmeta
2019-05-18 08:29:26 +02:00
Åke Forslund 4a75526de7 Check both endpoints for settings 2019-05-18 08:29:26 +02:00
Åke Forslund 93a0b31b4e Switch endpoint for fetching settings
use the userSkill endpoint instead of skill endpoint to always be able
to get settings no matter who the owner is.
2019-05-18 08:29:26 +02:00
Åke Forslund f6347ae47c Replace hashed meta with skill_gid as identifier
This also removes the notion of an owner skill and all skills may update settings on the server.
2019-05-18 08:29:26 +02:00
Åke Forslund 693bf2c699 Remove BLANK boilerplate content 2019-05-18 08:29:26 +02:00
Åke Forslund 56ed5a657f Re-add support for skill_gid in settingsmeta upload 2019-05-18 08:29:26 +02:00
Ruthvicp d2514b01be Remove additional space after initials 2019-05-16 17:27:51 -05:00
Åke fc7a3af14e
Merge pull request #2124 from MycroftAI/feature/upgrade-precise
Support chopping old audio via precise upgrade
2019-05-16 12:07:58 +02:00
Aditya Mehra eb32570efa Feature/System_QML (#2121)
Add support for SYSTEM QML functions for show_text() and show_image()

The ui elements used are stored in the mycroft/res/ui folder
2019-05-16 09:09:01 +02:00
Åke Forslund 1400af2b16 Fix pycodestyle errors 2019-05-15 13:46:43 +02:00
Matthew D. Scholefield dd71f24f29 Support chopping old audio via precise upgrade
This supports dropping audio buffers when the cpu falls behind so that the latency doesn't infinitely increase.
2019-05-15 02:38:33 -05:00
Åke Forslund 5ed417cddb Small style fixes
- Remove unneccessary pass
- Fix bare except statements
- Fix identation
2019-05-13 16:48:15 +02:00
Ruthvicp 90ccae2f69 Cache pre-loading for mimic2
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.
2019-05-13 14:33:30 +02:00
Aditya Mehra ccb23f14bf feature/enable sending qml ui over network (#2106)
Enable sending qml ui over network
2019-05-13 10:43:29 +02:00
ChristopherRogers1991 6dd16915a9 Allow settingsmeta to be a yaml file (#2113)
Allow settingsmeta to be a yaml file in addition to the current .json file
2019-05-13 09:34:39 +02:00
Kate Canaveral b95c8c990b Fix typo in mycroft.conf (#2119) 2019-05-12 23:11:41 -07:00
devs-mycroft b0157b46c8 Version bump from 19.2.6 to 19.2.7 2019-05-09 09:50:31 +00:00
Matthew D. Scholefield 09e7a18b77
Merge pull request #2116 from forslund/feature/delay-on-422
Add delay on failure to upload skillsettingsmeta
2019-05-07 19:28:12 -05:00
Åke Forslund 0b11cdac0a Add delay on failure to upload skillsettingsmeta
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
2019-05-07 14:50:17 +02:00
Chris Rogers aaa1a7f55a Add docs and fix IoTRequest repr 2019-05-06 15:57:49 -04:00
Chris Rogers b3d6cc35c0 Add support for values 2019-05-06 15:57:49 -04:00
Thomas Doczkal 59fd7233d8 typo (#2086)
Aprill .. April
2019-04-29 13:00:00 -05:00
devs-mycroft e966eee1b7 Version bump from 19.2.5 to 19.2.6 2019-04-25 12:14:50 +00:00
devs-mycroft 3e20433fd3 Version bump from 19.2.4 to 19.2.5 2019-04-25 09:24:07 +00:00
Åke 32636fe55f Set default log level to INFO (#2070)
* 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
2019-04-22 14:06:01 -05:00
Kris Gesling 947fadbe1f fix table formatting for docs display 2019-04-20 13:15:39 +09:30
Kris Gesling 88a822727c
Merge pull request #2095 from forslund/docs/tidying
Tidy up the readthedocs documentation
2019-04-20 03:02:56 +09:30
Matthew D. Scholefield 8c09f88e53
Merge pull request #2088 from forslund/feature/audioservice-list
Feature/audioservice list
2019-04-19 00:30:38 -05:00
jarbasal e256e3d1a6 restore bus on_message 2019-04-16 23:28:51 +01:00
Åke d2690979db
Merge pull request #2098 from MycroftAI/feature/precise-default
Change default listener in config
2019-04-16 13:41:27 +02:00
Åke 7a8ea0b5cc
Merge pull request #2099 from MycroftAI/commonIoT/trigger
Add trigger action
2019-04-16 11:15:34 +02:00
Åke 3841d5c13c
Merge pull request #2096 from MycroftAI/commonIoT/acknowledge
CommonIOT/acknowledge
2019-04-16 11:14:27 +02:00
Chris Rogers 8a75b77204 Add trigger action 2019-04-15 14:01:35 -04:00
Matthew D. Scholefield 794d91e7f7 Change default listener in config
It has been previously set using other configurations like /etc/mycroft.conf on the Mark 1
2019-04-15 11:11:21 -05:00
Chris Rogers b975f2f9cf file -> audio_file 2019-04-14 18:36:07 -04:00
Chris Rogers 6afadbed4c Remove wait 2019-04-14 18:32:01 -04:00
Chris Rogers 2a6f113151 Add function to acknowledge success non-verbally 2019-04-14 10:11:52 -04:00
Chris Rogers 61e4aeb55f Make temp, heat, ac things instead of attributes 2019-04-14 10:06:00 -04:00
Åke Forslund 6fbb49c1e9 Add some docstrings for CommonPlay/Query skills 2019-04-14 09:51:26 +02:00
Åke 566630d9e3 Fix infinily adding pages to existing namespace (#2093)
Update the local representation with the new pages when appending pages to an existing namespace.
2019-04-11 13:24:43 -05:00
devs-mycroft d0f55186cb Version bump from 19.2.3 to 19.2.4 2019-04-11 09:44:58 +00:00
Åke 0a887bf6bb Restore settings polling to 1 minute interval (#2091) 2019-04-10 13:38:58 -05:00
Åke 0593957508
Merge pull request #2089 from MycroftAI/feature/remove-stop-threshold
Remove "stop_threshold"
2019-04-10 11:59:17 +02:00
Steve Penrod dd976b6042 Fix bug with paused audio
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.
2019-04-09 01:49:54 -05:00
Steve Penrod 663d6821b2 Remove "stop_threshold"
The setting "stop_threshold" is not used (and doesn't look like it ever was).  Removing
from mycroft.conf.
2019-04-08 23:01:54 -05:00
Chris Rogers 7641cc00b0 Add thermostat related attributes 2019-04-08 18:19:52 -04:00
Åke Forslund 9248be1691 Add list of available backends to audioservice
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.
2019-04-08 15:28:56 +02:00
Åke Forslund 0d401c8757 Remove superfluous mycroft.stop handler removal 2019-04-08 15:13:34 +02:00
devs-mycroft 4b45db34ec Version bump from 19.2.2 to 19.2.3 2019-04-07 00:06:55 +00:00
Åke 031175ae89
Merge pull request #2084 from forslund/feature/settings_poll-time
Poll settings only every 5 minutes
2019-04-07 00:59:12 +02:00
Åke Forslund e63bce2a97 Clean the skills.json before sending it up.
- Only include the 'version', 'blacklist' and 'skills' field.
- remove duplicate entries (with the same name)  in 'skills' section
2019-04-07 00:36:25 +02:00
Åke Forslund bee167c875 Poll settings only every 5 minutes 2019-04-07 00:26:16 +02:00
Åke Forslund 54781a9249 Reverts back to 19.2.2
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.
2019-04-07 00:01:36 +02:00
Åke e046377ce1 Fix a couple of minor issues intruduced by skill_gid (#2079)
- name collision for display_name function and variable
- name -> self.name
2019-04-05 16:43:47 -05:00
Åke 637166e624 Revert "Remove reliance on hashed meta (#2076)"
This reverts commit 38123a1fc3.
2019-04-05 17:57:06 +02:00
Åke 38123a1fc3 Remove reliance on hashed meta (#2076)
* 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.
2019-04-04 02:03:08 -05:00
Åke Forslund f60d2372bb Add missing license header 2019-04-02 18:26:44 +02:00
Åke 82fa314ce9 Feature/skillsmeta gid (#2074)
* 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
2019-04-02 11:14:49 -05:00
devs-mycroft 6706c37782 Version bump from 19.2.1 to 19.2.2 2019-03-29 00:07:49 +00:00
Åke Forslund 466f187eb7 Remove extra LOG statement 2019-03-28 23:29:07 +01:00
Åke d2e6d310ad Run normalized also when raw matches None (#2073)
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
2019-03-28 15:43:28 -05:00
Åke Forslund 381999d5a8 Minor issues
- padatious sentence defaults
- A bit more explanation about the adapt message utterance
2019-03-28 14:50:50 +01:00
Steve Penrod 342c730a97 Normalize utterances before intent handling
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.
2019-03-28 14:48:26 +01:00
Åke Forslund 6186afd25f Remove the mimic_fallback_obj at shutdown 2019-03-28 11:15:45 +01:00
Ruthvicp ba305c5bfc separate the cache & avoid voice overlap
- The cache is now stored in a TTS specific directory
- Only a single fallback-tts is created
2019-03-28 10:40:02 +01:00
jarbasal 64a58f3290 tonight remainder 2019-03-27 11:15:24 +00:00
Ruthvicp b28011681e handling tonight in date & time extraction (#2066)
* handling tonight in date & time extraction
2019-03-27 01:41:50 -05:00
Åke feb82a2bb1 Add the SkillGUI method send_event() (#2057)
* 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'})
2019-03-27 01:22:05 -05:00
jarbasal a788efd1d0 update to new lang scheme 2019-03-26 13:46:04 +01:00
jarbasal 42e258610e feature/format_pt 2019-03-26 13:45:59 +01:00
Åke ca1115979d
Merge pull request #2062 from MycroftAI/feature/timer-translations
Add translations from the Timer skill
2019-03-25 15:33:11 +01:00
Åke Forslund ea0d23b975 Fix day/hour/minute/second translations 2019-03-25 14:52:26 +01:00
Chris Rogers d04ad5f8b0 Remove enum.auto
Replace enum.auto with a similar, custom function. This is for python3.4
compatibility.
2019-03-24 14:07:49 -04:00
Åke e2b70d1fa4
Merge pull request #2060 from MycroftAI/feature/configurable-precise-threshold
Make precise sensitivity configurable
2019-03-22 22:33:49 +01:00
Åke 9eeb8cefc3 Fix mimic 2 long sentences (#2061)
* 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
2019-03-22 10:20:06 -05:00
Steve Penrod 93cf07e9ed Add translations from the Timer skill
Moved translated text from the Timer skill into core.  This began
the mycroft-core translation effort for Russian and Turkish!
2019-03-22 09:55:13 -05:00
Matthew D. Scholefield a9fb77a27c Make precise sensitivity configurable 2019-03-21 17:45:38 -05:00
Åke dfa714c56d
Merge pull request #2059 from MycroftAI/feature/padatious-priority
Adjust and document Padatious loose fallback priority
2019-03-21 23:38:25 +01:00
Steve Penrod 41773a039a Adjust and document Padatious loose fallback priority
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.
2019-03-21 17:16:07 -05:00
Åke 9f29649fc0 Feature/non hard coded paths (#2058)
* Allow ~ when running ensure_directory_exists

* Add custom paths for websettings cache and system conf
2019-03-21 13:19:11 -05:00
Åke 66f9f3f100
Merge pull request #2012 from MycroftAI/bugfix/audio-protection
Protect against failure to launch WAV/MP3
2019-03-15 10:28:17 +01:00
Steve Penrod 688d0e6704 Protect against failure to launch WAV/MP3/Ogg
The playback of WAV/MP3 could throw exceptions if something went
wrong, which seemed inappropriate.  Now it just generates an error
message in the log.
2019-03-15 09:57:04 +01:00
devs-mycroft 8228b49230 Version bump from 19.2.0 to 19.2.1 2019-03-14 20:54:39 +00:00
Åke Forslund c3f2b73794 set_active_lang on startup of skills 2019-03-14 11:00:51 +01:00
Steve Penrod a5dcc8d3d3 Fix unit test errors 2019-03-14 10:57:31 +01:00
Steve Penrod 44f60ec6f3 Change default lang to None, not English
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
2019-03-14 10:57:31 +01:00
ChristopherRogers1991 ffd58cb4ef Feature/common io t updates (#2050)
* 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
2019-03-13 22:51:54 -05:00
Åke 327511c937 Fix simple audio backend pausing by voice (#2045)
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.
2019-03-08 02:24:58 -06:00
Åke 20ee4fddf0
Merge pull request #2044 from MycroftAI/feature/simple-audio-pausing
Add pause/resume to simple audio services
2019-03-08 08:46:51 +01:00
Steve Penrod dd25b76be6 Add pause/resume to simple audio services
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.
2019-03-07 17:40:59 -06:00
Steve Penrod cd6db9f645 Bugfix for Mimic2 issues (#2043)
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
2019-03-07 14:55:31 -06:00
Åke 526d326ecf Mute the mic while playing the listening "beep" (#2042)
This also extends the stream mute to actually stopping the recording stream while muted.
2019-03-07 13:42:00 -06:00
Steve Penrod 230c3057b4 Give Padatious high and low match passes
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.
2019-03-05 03:33:02 -06:00
Andreas Lorensen 6c0cd8d427 Add danish 2 - initial work to get danish to core (#2033)
* Danish formatting and parsing functions
2019-03-04 21:40:12 +01:00
Angel Docampo fdeb66c3e4 Fixed pep8 issues 2019-03-04 15:37:28 +01:00