Commit Graph

3087 Commits (refactor/python-detect)

Author SHA1 Message Date
Kris Gesling d4d7d09e40 remove hardcoded timeouts; already moved to conf 2020-08-19 20:35:23 +09:30
Kris Gesling fac4744a30
Merge pull request #2657 from AIIX/feature/override-animations
Allow override for animations in platform skills
2020-08-19 06:53:59 +00:00
Kris Gesling b444d00ccf remove previously deprecated speaking utils 2020-08-18 23:31:07 +09:30
Kris Gesling 666178c483 remove unnecessary remove_last_slash method 2020-08-18 23:06:42 +09:30
Kris Gesling ed46311cd8 remove unnecessary get_http method 2020-08-18 23:04:53 +09:30
Kris Gesling 2643caadf8 remove previously deprecated DialogLoader class 2020-08-18 22:56:34 +09:30
Kris Gesling 23d1d35ea9 remove deprecated startListening signal 2020-08-18 22:21:38 +09:30
Kris Gesling 58a5cddbd6 remove previously deprecated error msg 2020-08-18 22:14:32 +09:30
Åke Forslund 10092c3a9e Don't reload skill if a mod time is in the future
This stops a skill from being reloaded repeatedly if a file gets a bad
modification time.

It also logs the offending files in the error message.
2020-08-18 09:52:59 +02:00
Kris Gesling 7f7c97d0f6
Merge pull request #2662 from MycroftAI/bugfix/empty-arg
Do not call max if files list is empty
2020-08-18 07:28:15 +00:00
Kris Gesling ac8e10898f remove deprecated ThreadedEventEmitter 2020-08-18 16:00:51 +09:30
Kris Gesling d70c425854 switch deprecated EventEmitter to other classes 2020-08-18 15:58:42 +09:30
devs-mycroft 9d00f71c5e Version bump from 20.2.4 to 20.2.5 2020-08-17 13:22:08 +00:00
Åke Forslund 81570f14e9 WIP fix pylint warnings in context manager 2020-08-14 13:40:16 +02:00
Kris Gesling 8065f5cbee do not call max if files list is empty 2020-08-14 21:05:32 +09:30
Åke Forslund 8089411d93 Fix warnings from pylint in intent_service.py
- Add missing docstrings
- fix short variable names
- restructure return code
2020-08-13 09:28:23 +02:00
Åke Forslund d9281d7795 Handle pylint warnings for padatious_service 2020-08-13 09:28:23 +02:00
Åke Forslund 841ed2dcfc Update for pylint conformity for adapt module
- imports
- All docstring
- AdaptService method warnings
2020-08-13 09:28:23 +02:00
Åke Forslund 618daac9a4 Pair utterances with normalized versions
- Move setting original utterance to the respective intent service
- Remove botch limiting the intent service to a single STT hypothesis
2020-08-13 09:28:18 +02:00
Kris Gesling 5dac7fe54c disable wakeword uploads before deprecating API 2020-08-13 16:49:54 +09:30
Kris Gesling 7aa80e2b7d remove duplicate and unused method 2020-08-13 16:46:08 +09:30
Åke Forslund 917127638b Remove workaround for adapt one_of intents
This issue was properly fixed in Adapt 0.3.5.
2020-08-13 08:18:55 +02:00
Åke Forslund 008ab372fd FallbackService encapsulating fallback calls 2020-08-13 08:18:51 +02:00
Åke Forslund bb8d4e3c1f Generalization of intent service Episode IV
Simplify the handle_utterance into a list of intent matching functions
run in order until a match is found.

The resolution order is

- Converse
- Padatious High Confidence
- Adapt
- Fallback High priority
- Padatious Medium Confidence
- Fallback Medium priority
- Padatious Last ditch effore
- Fallback Low priority

This collects the many parts of where intent is handled into a single
location handling the entire flow.

The idea is that, in the end, all the skill calling should be done from
this method. The main intent parsers does this but the converse and
fallback still calls directly.
2020-08-13 08:12:53 +02:00
Åke Forslund b52cc55f25 Add support for ranges of fallbacks
If no range is provided it defaults to 0-100 to be backwards compatible
2020-08-13 08:12:53 +02:00
Åke Forslund 4c87bc23d4 Move padatious service to within the IntentService 2020-08-13 08:12:53 +02:00
Åke Forslund e93d23f0df Split out adapt from the intent_service. 2020-08-13 08:12:53 +02:00
Aditya 4d8cd10b31 fix pep8 errors 2020-08-12 22:03:38 +05:30
Aditya 61611ea6e2 allow override for platform skill animations 2020-08-12 21:29:49 +05:30
Åke Forslund b24679a17c Amendments after comments PR comments
- Fix playlist_position description
- Make CPS_send_tracklist() require a playlist argument
- change docstring for the playlist type
2020-08-11 23:09:06 +02:00
Kris Gesling 55cd62470f
Merge pull request #2619 from forslund/feature/common-play-inform-gui
Add method for updating playback information from skills
2020-08-11 07:14:22 +00:00
Åke Forslund 8f4847ff77 Status and track list suggested by @Jarbasal
This commit adds the status, extended track info as well as a tracklist
information as proposed by Jarbasal.
2020-08-11 06:58:45 +02:00
Kris Gesling 69a1c1d082
Merge pull request #2644 from forslund/feature/install-defaults
Always install default skills before initial load
2020-08-11 01:53:50 +00:00
Kris Gesling 7d446b0222
Merge pull request #2650 from forslund/bugfix/stt-missing-lang
set active lang to configured if missing from STT and normalize
2020-08-10 06:36:46 +00:00
Kris Gesling 2270854692
Merge pull request #2649 from forslund/bugfix/extract_duration
Let lingua franca check extract_duration lang
2020-08-10 05:57:18 +00:00
Åke Forslund e9760cdce8 Normalize the lang code to lowercase only
This suites lingua franca better
2020-08-10 07:41:50 +02:00
Åke Forslund 6edaa58558 set active lang to configured if missing from STT
If the STT doesn't send a lang code fallback to configured language
instead of hardcoded en-us
2020-08-10 07:41:44 +02:00
Åke Forslund 6abfca67a6 Fix settings changed check after skill handler
Make self._initial_settings have an unique copy of the settings and not
a reference to the original ones.
2020-08-09 08:50:44 +02:00
Åke Forslund 2dde23467c Let lingua franca check extract_duration lang
Mycroft doesn't need to check for supported languages for
extract_duration, lingua_franca handles that internally.
2020-08-07 07:47:11 +02:00
Åke Forslund 49faadee03 Don't include blacklisted skills in defaults
Don't try do an install on startup if a blacklisted skill is uninstalled
2020-07-31 09:58:34 +02:00
Åke Forslund 0756da700a Always install default skills before initial load
This checks if all default skills are installed before continuing with
initial load.

For devices with no skills installed on first start this should ensure
that skills are installed before sending the mycroft.skills.initialized
to start precise training and generating the mycroft.ready message
2020-07-29 18:48:53 +02:00
Kris Gesling a5b7f55ae4
Merge pull request #2634 from forslund/bugfix/wait-for-response-timeout
Fix custom timeout for wait_for_response()
2020-07-29 07:03:15 +00:00
Kris Gesling 30177a01ed
Merge pull request #2643 from jmontane/dev
Add Festival TTS support
2020-07-28 04:59:59 +00:00
Joan Montané 594c838a00 Add Festival TTS 2020-07-27 18:04:27 +02:00
Åke Forslund 0a04efd88d Add system for checking audio service readiness
The new wait_for_loaded() method will wait until services has been
loaded. It has a 3 minute timeout (default)

This improves the audio service readiness indication to not trigger
until the services are loaded.
2020-07-24 22:12:54 +02:00
Åke Forslund 236a2ed594 Add hook for stopping 2020-07-22 11:06:47 +02:00
Åke Forslund a1fdae3415 Add support for watchdog in skills and speech client
If no watchdog is provided a dummy function will be called
2020-07-22 10:52:32 +02:00
Åke Forslund 09b1deb511 Add possibility for notification hooks for services
- skills
- audio
- speech client
- messagebus service
- enclosure

The main functions now accepts the arguments ready_hook and error_hook
allowing a service or runner script to catch these states and perform
actions accordingly.

This is useful for things like systemd or a desktop launcher.

Fix audio service startup
2020-07-22 10:52:27 +02:00
Åke Forslund 45cb8bec62 Add message for updating playback information from skills
This adds the function used by the npr-news-skill and spotify-skill to
communicate their info to the playback control showing the default
playback UI.

The function has the common parameters specified but is setup to be able
to add new functionallity without core changes.
2020-07-20 13:45:14 +02:00
jamesmf b94b07b35b revert iot dig_for_message 2020-07-14 23:11:10 -04:00
Åke Forslund cba284e4a0 Fix custom timeout for wait_for_response()
The method didn't forward the selected timeout and only the default wait
was ever used.
2020-07-10 09:11:35 +02:00
Kris Gesling b0c34cba97
Merge pull request #2507 from forslund/feature/pyee-7
Update pyee to v7.0.1
2020-07-09 16:10:00 +09:30
Åke Forslund 928e1a8b33 Mark ThreadedEventEmitter as depreciated 2020-07-07 08:36:57 +02:00
Åke Forslund 0fc1ba325a Update pyee to v7.0.1
pyee has added ThreadExecutor variant of the EventEmitter which can
replace the home-spun threadpool based emitter
2020-07-07 08:21:42 +02:00
Åke Forslund 2bb978362f Use bus.wait_for_message() method to wait for speak 2020-07-05 16:38:52 +02:00
Åke Forslund b7d709c3c8 Add wait_for_message() method to messagebus client
- Refactor message waiting into a MessageWaiter class to be able to use the
  same code in both wait_for_message and wait_for_response.
- Add some basic unittests
2020-07-05 09:28:17 +02:00
Åke Forslund 29f60e6d66 Clean up the wait_for_response method
- Use nonlocal instead of mutable object.
- Set default timeout in method argument
2020-07-05 09:28:17 +02:00
Kris Gesling aca6a18c5f
Merge pull request #2327 from MycroftAI/feature/importlib
Switch from the deprecated imp to importlib
2020-07-01 11:34:25 +09:30
Åke Forslund 58608e6458 Handle reloading of relative imports
Submodule reload is enforced by removing sys.modules reference. This
will make imports do the full uncached importing
2020-06-30 19:42:36 +02:00
Kris Gesling 072f409939
Merge pull request #2625 from MycroftAI/bugfix/audio-after-stop
remove messagebus argument
2020-06-30 08:53:59 +09:30
Kris Gesling bf6e6af3e3 remove messagebus argument 2020-06-29 21:38:12 +09:30
Kris Gesling 37a47915f7
Merge pull request #2621 from MycroftAI/bugfix/audio-after-stop
prevent audio playing between mic record and utt handling
2020-06-29 15:56:49 +09:30
Kris Gesling e39fe64ba4 minor cleanup for PR review 2020-06-29 14:30:39 +09:30
Kris Gesling c4478e82ad ensure volume restored after mic recording 2020-06-25 16:17:54 +09:30
Kris Gesling 83ece0e663
Merge pull request #2591 from forslund/bugfix/mint-skill-listing
Workaround issue with get_wch on older ncurses
2020-06-23 20:01:49 +09:30
Åke Forslund b968b06ccb Switch from the deprecated imp to importlib
Separate python 3.4 and 3.5+ implementation
2020-06-23 11:29:15 +02:00
Kris Gesling 4345011f7f prevent audio playing between mic record and handling 2020-06-19 15:27:48 +09:30
Kris Gesling c90a1a5bfe
Merge pull request #2616 from MycroftAI/feat/show_animated_image
self.gui.show_animated_image
2020-06-15 20:26:43 +09:30
jarbasal 6d3b9cda25 pep8 2020-06-14 22:55:33 +01:00
jarbasal 007f636946 self.gui.show_animated_image 2020-06-14 22:52:59 +01:00
Åke a0c7ea7caf
Merge pull request #2560 from forslund/refactor/settings-cleanup
Refactor settings cleanup
2020-05-31 13:37:34 +02:00
Åke 16145909a8
Merge pull request #2589 from forslund/refactor/speech-client
Refactor wake-word waiting and record phrase
2020-05-31 13:37:02 +02:00
devs-mycroft 5281f26187 Version bump from 20.2.3 to 20.2.4 2020-05-29 11:37:34 +00:00
Åke Forslund cdb04b1f3c Minor docstring update 2020-05-27 22:08:14 +02:00
Åke Forslund d494814ec0 Remove unused method 2020-05-27 22:08:14 +02:00
Åke Forslund 944cc416a5 Update SkillSettingsDownloader class
- Update docstrings
- Remove unused members
- Minor logic change to make download method more self-contained
2020-05-27 22:08:10 +02:00
Åke Forslund 86a978fadf Fix audio service startup without Internet
If started up without Network connection the audio service would crash
importing the google_tts module as it tried to fetch language list from
google.

This restructures it to be a just-in-time check. It also adds a cached
list of supported languages to use if an error occurs fetching language
codes.

A small fix allowing "en-US" to be matched to "en-us" instead of the
generic "en" is also included.
2020-05-27 21:28:26 +02:00
Åke Forslund 926d3ff1c1 Extract noise-tracking from _record_phrase
_record_phrase now uses a helper class to track the noise in a sentence
to determine when the user has stopped speaking.

The logic should be the same but the same but allow for easier testing
and manipulation.
2020-05-26 12:12:12 +02:00
Åke Forslund 9e73180206 Make sec_to_bytes a member of MutableMic
The function is based on the parameters of the Mic and is much more a
method of the mic than a static function
2020-05-26 12:12:12 +02:00
Åke Forslund 225f22fe82 Remove unused member variables
Move wakeword duration to the wakeword engine since all wakeword engines
doesn't really use phonemes
2020-05-26 12:12:12 +02:00
Åke Forslund dbf2bf45b1 Return status from wakeword as tuple
- Return the data from the wakeword as a tuple.
- Extract post wakeword actions from wait for wakeword method
2020-05-26 12:12:12 +02:00
Åke Forslund 567e08809a Refactor _wait_for_wakeword
- Add RollingMean data structure
- Add simple CyclicBuffer data structure
- Move out post find actions into separate method
2020-05-26 12:12:12 +02:00
Åke Forslund a783da2e03 Workaround issue with get_wch on older ncurses
get_wch can at times throw errors, this creates a function wait_for_any_key()
handling the error and retrying.
2020-05-20 10:54:37 +02:00
Åke Forslund 010562f3e1 Fix remove_fallback()
remove_fallback() was mainly created for use internally during shutdown
and required the wrapped callable to be able to remove a handler. This
makes it general, using a mapping to find the wrapper from a handler if
needed. The method now also returns the success/failure status
2020-05-19 10:51:53 +02:00
Åke Forslund 46c8a6b51f Add Voight Kampff support setting configurations
Adds the "Given the user's {config} is {value}" step implementation

This will patch the configuration with a section from a dictionary that
can either be a global (shipped in
mycroft/res/{lang}/configurations.json) or shipped with the test
definition. The file should be named the same as the feature file but
instead of ".feature" the extension should be ".config.json".

mycroft/res/text/en-us/configurations.json contains a couple of
pre-defined configurations that can be applied
- units (metric/imperial)
- location (Stockholm)

After each scenario any applied patch will be cleared
2020-05-18 14:48:14 +02:00
Åke Forslund cd1c3b7c1d Cleanup docstrings in configuration module 2020-05-18 14:29:42 +02:00
Åke Forslund 91dbe76d58 Add messagebus message to clear patch data 2020-05-18 14:29:42 +02:00
Bart Ribbers 01900e5a29 Check the skill directory and XDG_CONFIG_DIR for settings 2020-05-15 11:45:13 +02:00
Åke 4ab9469ff7
Merge pull request #2585 from forslund/polly_tts
Add Polly tts
2020-05-15 08:22:25 +02:00
Åke 90d2570cc3
Merge pull request #2575 from PureTryOut/optional-deps
Move requirements.txt to a new requirements folder and add optional deps
2020-05-14 15:04:56 +02:00
Åke Forslund 094c2c28d0 Test loading of phonetic spelling dictionary
This also normalizes the path slightly to make sure that the phonetic
spelling is loaded even if the lang code contains capitals.
2020-05-12 08:58:18 +02:00
Åke Forslund 1ee8ec0ff9 Generalize Espeak missing error 2020-05-11 16:14:24 +02:00
Åke Forslund 23c04bf9f0 Update ESpeak to modern TTS standard.
- Fixes wait_while_speaking
- Adds Caching support
2020-05-11 16:14:19 +02:00
Bart Ribbers 531f78c499
Move requirements.txt to a new requirements folder and add optional deps
Some dependencies aren't actually required but can be optionally
installed for extra functionality.

The Chromecast is an optional audio backend
VLC is an optional audio backend
pyalsaaudio is only used by the mark1 enclosure
google-api-python-client is an optional STT backend, by default Mycroft
uses the Mycroft servers
2020-05-11 15:31:10 +02:00
Åke Forslund 2036bbb63c Fix bug in adds context decorator missing content
The words parameter is now passed to the set_context method as intended.
2020-05-11 06:50:36 +02:00
Åke Forslund c78c4f6c03 Clean up docstrings for context decorators 2020-05-11 06:50:33 +02:00
devs-mycroft 960efbdbbb Version bump from 20.2.2 to 20.2.3 2020-05-07 14:07:13 +00:00
Rafał Janicki 3e3a536fd5 Polish language support 2020-05-05 19:55:27 +02:00
Tony763 b58d19449b Initial Czech support
- czech resource files
2020-04-28 15:02:57 +02:00
Kris Gesling 6640861b30
Merge pull request #2548 from codyreinold/bugfix/issue-2516
Issues-2516 - Resolved IBM Cloud integration issue
2020-04-27 12:21:27 +00:00
Åke bcb426ab69
Merge pull request #2496 from forslund/test/util
Refactor and test util functions
2020-04-27 10:47:59 +02:00
codyreinold 5b74edd46b Issue-2516 - Remove unnecessary library (urllib.parse) 2020-04-27 03:32:51 -04:00
Cody Reinold d6c9a64c80 Issue-2516 - Use requests.post kwarg to pass URL params 2020-04-27 03:23:07 -04:00
Åke Forslund 1258480f30 Improve audio utils log 2020-04-27 08:38:44 +02:00
Cody Reinold f721804899 Issues-2516 - Correct minor issue with documentation 2020-04-26 03:51:26 -04:00
Cody Reinold e50ea28dd5 Issues-2516 - Resolved IBM Cloud integration issue, switching from user / pass to api key. 2020-04-26 01:43:39 -04:00
devs-mycroft 4d45933c80 Version bump from 20.2.1 to 20.2.2 2020-04-23 13:22:41 +00:00
Åke 0214b766a4
Merge pull request #2542 from forslund/bugfix/mute-before-lock
Move mute stage of __init__() after creating lock
2020-04-20 13:14:56 +02:00
Åke Forslund 202cc94262 Fix uploading settings meta
This changes the order so the started flag is set before the settingsmeta
the send() method is called.

The send() method now exits if the started flag isn't set causing the
skill settings not to be uploaded
2020-04-20 09:57:03 +02:00
Åke Forslund 7586de86d9 Fix MutableStream __init__ with mute=True
If the stream is restarted while muted this would cause an Exception
leading to an unresponsive voice client due to the read_lock being
called before creation.
2020-04-20 09:26:31 +02:00
Åke Forslund f19547860b Update polly access key config to match AWS better
key_id -> access_key_id
secret_key -> secret_access_key
2020-04-19 17:53:02 +02:00
jarbasal 751040d653 default voice 2020-04-19 17:25:56 +02:00
jarbasal 3707df87b3 update to newer TTS architecture 2020-04-19 17:25:38 +02:00
jarbasai 383ac5f69e Add Amazon polly tts 2020-04-19 17:24:56 +02:00
Åke caa77b33f7
Merge pull request #2538 from forslund/bugfix/enclosure-shutdown
Fix enclosure shutdown
2020-04-18 08:00:07 +02:00
Åke Forslund 707be52f21 Update time util docstrings 2020-04-17 23:42:04 +02:00
Åke Forslund 313aaa660d Improve documentation of download util 2020-04-17 23:42:04 +02:00
Åke Forslund c5dccc16e2 Improve getting tmp download path 2020-04-17 23:42:04 +02:00
Åke Forslund 3a908a1e35 Minor cleanup of download docstrings and imports 2020-04-17 23:42:04 +02:00
Åke Forslund 06157e3331 Reuse ensure_directory_exists() in create_file()
ensure_directory_exists() now takes the directory permissions as an
optional argument.
2020-04-17 23:42:04 +02:00
Åke Forslund 26ef052891 Minor cleanups
- Remove superfluous parentheses
- Remove unneccessary pass
2020-04-17 23:42:04 +02:00
Åke Forslund aa42552d97 Refactor test change loglevel and add tests for process_utils 2020-04-17 23:42:04 +02:00
Åke Forslund b0be6a7ff9 Correct some docstrings 2020-04-17 23:42:04 +02:00
Åke Forslund 82e350064c Simplify and clean up curate_cache
- create helper functions for getting file stats and removing files in
order of age
- create wrapper function for turning MB into bytes
2020-04-17 23:42:04 +02:00
Åke Forslund e3f4d22b7e Simplify record function 2020-04-17 23:42:04 +02:00
Åke Forslund cf40c2e36c Refactor play_* functions to use a common base
Adds comments for PULSE ENVIRONMENT
2020-04-17 23:42:11 +02:00
Åke Forslund 60c0af69d6 Replace read_stripped_lines with generator 2020-04-17 23:42:04 +02:00
Åke Forslund a0709c885c Mark redunant string_utils as to be removed 2020-04-17 23:42:04 +02:00
Åke Forslund 71683d18d4 Refactor util library.
Move utils away from the __init__.py file
2020-04-17 23:42:04 +02:00
Åke Forslund 7e88ae7e88 Correct the datdir/res path
Comment says the folder to be checked should be datadir/res, this makes
the code mean the same thing.
2020-04-17 23:42:04 +02:00
Åke Forslund b991453bcf Update docstrings of mycroft/util/__init__.py 2020-04-17 23:42:04 +02:00
Åke Forslund d51fb126b8 Fix fallback to mimic
After catching exception to clear the isSpeaking flag the exception
shall be re-raised to allow the fallback TTS to trigger.
2020-04-17 20:43:13 +02:00
Aditya Mehra c5c0881d94 Add configuration option to set microphone timeout
listener->recording_timeout: Maximum length of recording
listener->recording_timeout: Maximum length of silence before stopping
recording
2020-04-17 11:23:25 +02:00
Åke Forslund 6d13872638 Cleanup of the enclosure entrypoint
- split out enclosure determination code
- Add docstrings
- Increase logging
2020-04-16 10:58:07 +02:00
Åke Forslund 290d950424 Fix shutdown of enclosure process
Previously it would always be killed, now it exits smoothly.
2020-04-16 09:47:53 +02:00
Luca Vercelli a9cfa513a3 Use lang validator to raise error 2020-04-15 08:58:40 +02:00
luca-vercelli 0718e397c5 Issues-2534 - language fallback fix
update the lang value if currently set language doesn't exist.
2020-04-15 08:57:49 +02:00
Åke 867ae0654e
Merge pull request #2533 from MycroftAI/feature/gui-connection-update
Gui connection update
2020-04-10 09:42:04 +02:00
Åke fb356872e4
Merge pull request #2529 from forslund/feature/stop-sequence
Update skill stop sequence
2020-04-07 23:06:19 +02:00
Åke Forslund b7cf8e755e Remove origin check from gui websocket
This allows simple websocket clients to connect as well.
2020-04-04 09:15:47 +02:00
Åke Forslund 4f65591c21 Simplify the GUI websocket code
Use a single websocket but don't send data from clients to other
clients.
2020-04-04 09:13:51 +02:00
Åke Forslund 9246190c34 Reduce timeout for track info response
The 5 second timeout made the playback control take quite some time to
shutdown if the audio process isn't running.
2020-04-02 19:18:17 +02:00
Åke Forslund 6b27ceca1c Allow stopping settings upload mid-stride
The upload queue will now check if it's stopped while consuming the
queue, allowing quicker shutdown if triggered while in the middle of
uploading settingsmeta.
2020-04-02 19:13:51 +02:00
Åke Forslund 2a50fb1578 Warn about skills that take a long time to shutdown 2020-04-02 19:13:16 +02:00
Åke Forslund 0d51a04166 Fallback to internal version if no version file exists
This will allow non-packaged versions of mycroft core to report version
to the backend.
2020-04-02 16:02:18 +02:00
Åke 28c3a61e1c
Merge pull request #2503 from forslund/bugfix/converse-error
Bugfix Converse error
2020-04-02 07:45:00 +02:00
andlo 0a916de238 fix danish typos and better translations 2020-03-31 09:33:33 +02:00
jarbasal 9d712a898f Update docstrings 2020-03-30 12:05:58 +02:00
jarbasal efc9af558a Read mark1 eye color 2020-03-30 12:05:49 +02:00
Åke Forslund c8be703e49 Additional zero was prepended.
The formatting of small numbers was fixed in lingua franca
2020-03-26 18:43:19 +01:00
Kris Gesling 1b49774091 Generalize custom remote TTS url config 2020-03-26 20:27:39 +09:30
Kris Gesling bcd45dd0fd add learning-opt-out to request params
fix pep-8
2020-03-26 15:41:09 +09:30
Kris Gesling 15ad6c7249 Add configurable API url to Watson TTS
The new IBM Watson TTS service now provides a unique url for your TTS
API resource. This adds a configuration option to override the default
url. As the url provided by IBM contains the api_path, we check for it 
and if found remove it, as the RemoteTTS.__request method appends it 
when making the call.
2020-03-26 13:39:00 +09:30
Åke Forslund 35d9558998 Handle communication failure with converse handler 2020-03-24 10:42:07 +01:00
Åke Forslund b52722faf3 Add dummy TTS backend
The backend doesn't generate any audio playback, only consumes the
messages
2020-03-24 10:42:07 +01:00
Åke Forslund 27de6c72c4 Add empty tts output on execute exception
This will make sure that the isSpeaking flag is cleared correctly
2020-03-24 10:42:07 +01:00
Åke Forslund d7cab332fe Add skill to speak meta information 2020-03-23 11:41:13 +01:00
Åke Forslund d9d5f57a4f Add meta information about the speech dialog
Provides meta data such as dialog used and data that was inserted.
2020-03-23 11:41:13 +01:00
Åke Forslund f0a6d1a714 Minor clean up of intent_service.py
- Remove print statement
- Remove unused import
- Updated some docstrings
2020-03-15 19:23:25 +01:00
Åke Forslund 4982af46b1 Add check for empty skill IDs
Only allow non-empty skill IDs into the list of active skills
2020-03-15 19:23:25 +01:00
Åke Forslund af50fb5e59 Override make_active for padatious
Padatious doesn't shouldn't report active like other skills, this only
sent an empty skill entry to the active skills list.
2020-03-15 19:23:25 +01:00
Åke Forslund 8e61019451 Copy the list of active skills during operations
A skill can be missed if a skill is removed (due to an error) from the
list during iteration
2020-03-15 19:23:25 +01:00
Åke eee3e7aac2
Merge pull request #2479 from forslund/feature/simplify-converse
Simplify the converse callings
2020-03-15 08:42:58 +01:00
dalgwen 003f2920a3 Enable snowboy to use several wakeword models
Snowboy could use several wakeword models, not only the first one.
2020-03-11 08:34:50 +01:00
devs-mycroft 32557365da Version bump from 20.2.0 to 20.2.1 2020-03-09 10:35:37 +00:00
Åke Forslund 58f0ac8b9e Simplify the converse callings
Remove the use of the separate error message and use the wait_for_reply method
to get the converse result. The error message is left to guarantee
compatibility.
2020-03-07 11:11:21 +01:00
Åke 05cae9d319
Merge pull request #2429 from MycroftAI/bug/mark1_faceplate
mark1/fix display big images
2020-03-06 18:10:40 +01:00
Åke 02a48f954c
Merge pull request #2489 from forslund/feature/mark-1-enclosure-v1.4.2
Bump enclosure version
2020-03-04 08:44:11 +01:00
Åke Forslund 1fcaffa363 Use copy in loops where the len of active_skills may change 2020-03-03 21:41:03 +01:00
Åke Forslund 2070e9aac9 Bump enclosure version 2020-03-02 15:25:22 +01:00
Åke Forslund ed4c6f7248 Fix resetting of converse state on STT failure
The handler was silently failing when the STT doesn't receive any data.
2020-03-02 11:25:23 +01:00
devs-mycroft 153149c136 Version bump from 20.2.-1 to 20.2.0 2020-02-27 17:51:24 +00:00
Åke Forslund 5867b4fe2e Remove debug logging of stop message context 2020-02-27 14:33:34 +01:00
Åke 1051eef1ba
Merge pull request #2477 from ludwhe/dev
Added a "save_path" configuration for saved wake words and utterances.
2020-02-27 11:04:27 +01:00
Åke Forslund 0489595d96 Bump the version to the new 20.02 range 2020-02-27 08:55:50 +01:00
ludwhe 49c6b298f1 Add path checks 2020-02-27 08:33:11 +01:00
ludwhe 9403665f8e Comment out 'save_path' by default 2020-02-27 08:33:11 +01:00
ludwhe af6b7353e6 Added a "save_path" configuration for saved wake words and utterances. 2020-02-27 08:33:06 +01:00
Chris Veilleux baf194c556 remove deprecated Settings class and any code in core that references it. 2020-02-27 08:07:07 +01:00
Åke Forslund ef76f685bf Only register for stop events if skill uses them. 2020-02-26 07:25:45 +01:00
Åke Forslund bdf7f02226 Remove specific metrics thread from TTS system 2020-02-26 07:25:45 +01:00
Åke Forslund 0ab7758784 Send timing information in batches every 30 seconds
Sets up a thread with a queue interface to handle the upload of timing
information to the backend.

Previously this was done in the emitter thread after a skill or
subsystem had delivered their content to avoid slowing down the system.
However massively parallell calls like the "mycroft.stop" message would
starve the threadpool casuing the upload time to limit the execution
speed of these.
2020-02-26 07:25:28 +01:00
Kris Gesling bf2db3d79a
Merge pull request #2472 from belvederef/patch-1
Convert hash sign comments to double slash (# -> //)
2020-02-24 23:04:14 +09:30
Åke Forslund d30f778026 Make message.response keep source/dest info 2020-02-24 10:37:10 +01:00
Åke 1afedb2dd2
Merge pull request #2468 from JarbasAl/feat/intent_api
intent api
2020-02-24 08:40:36 +01:00
jarbasal 09cc3f6294 cleanup 2020-02-24 08:23:35 +01:00
jarbasal 3728e2013b norm utterances 2020-02-24 08:23:35 +01:00
jarbasal 74d07f0fdc Fix lang parameter 2020-02-24 08:23:26 +01:00
jarbasal 1e00347834 message fix 2020-02-24 07:46:46 +01:00
jarbasal befab62a58 get_skill from utterance 2020-02-24 07:46:46 +01:00
jarbasal d3037f2ba1 move to intent_service_interface 2020-02-24 07:46:46 +01:00
jarbasal f1c55cc809 padatious match 2020-02-24 07:46:46 +01:00
jarbasal 16f91c8ebe add regex 2020-02-24 07:46:46 +01:00
jarbasal 532bcc2b2a intent api 2020-02-24 07:46:46 +01:00
Åke Forslund e1fa0e3ad2 Set context from previous message when doing converse 2020-02-22 09:35:03 +01:00
Åke Forslund acf3b96aa2 Make padatious service forward the intent call 2020-02-21 08:26:47 +01:00
Åke Forslund aad961f1b5 Copy message context on reply
This ensures that the original context isn't modified, for example when
converse is used the reply there would switch the source/destination for
the original message making the skill speak to the wrong destination.
2020-02-21 07:57:46 +01:00
Åke Forslund 1a0432255c Handle missing message idents in converse
Handle the case where context exists but without ident
2020-02-21 07:57:46 +01:00
Åke Forslund 9ea0abe264 Update default branch for skill updates to 20.02
This referes to the settings made to msm when used by the installer
skill and the default skill updates done in the skills process
2020-02-19 08:02:02 +01:00
Åke Forslund b581766a00 Fallback to mimic for bad http status codes
Added a RemoteTTSException exception for non-timeout exceptions, Mimic2
will consider HTTP status code 200-299 as OK while other responses will
trigger raise RemoteTTSException.
2020-02-17 15:08:21 +01:00
jarbasal 0533ab0d2a Correct docstring for enclosure api eyes_fill 2020-02-15 16:33:49 +01:00
jarbasal 0de7f11c6e execute TTS from debug_cli 2020-02-15 15:35:43 +01:00
jarbasal f209afb021 Move dig_for_message to messagebus submodule 2020-02-15 15:35:43 +01:00
jarbasal fc9e254eef common iot message context 2020-02-15 15:35:43 +01:00
jarbasal f4a96e6c22 Update Unittests and fix pep8 2020-02-15 15:35:43 +01:00
jarbasal cc8029a357 pass context in scheduled events 2020-02-15 15:35:43 +01:00
jarbasal 75c796a29d add context to all listener messages 2020-02-15 15:35:38 +01:00
jarbasal e57671ebeb capture all in cli 2020-02-15 12:52:23 +01:00
jarbasal ef556557ad Fallback skill forward messages 2020-02-15 12:52:10 +01:00
jarbasal 0a560602c7 Use forward to send messages in MycroftSkill 2020-02-15 12:50:49 +01:00
Jarbas-Core d16964c580 bus message targetting 2020-02-15 12:37:25 +01:00
Åke a6cb0c5258
Merge pull request #2470 from forslund/refactor/remove-configurationmanager
Remove the ConfigurationManager compatibility
2020-02-15 08:41:34 +01:00
Francesco Belvedere e7703da3d1
Convert hash sign comments to double slash (# -> //)
The hash sing makes it difficult to deal with the json file. Even using tools like [jsmin](https://github.com/tikitu/jsmin/) does not help since hashes are not supported. To enhance interoperability and consistency, they can be removed (also because only two lines use them).
2020-02-14 23:08:11 +00:00
Åke Forslund 968370cbf1 Remove exec permission from format files
mycroft/util/format.py and test/unittests/util/test_format.py
2020-02-13 07:59:16 +01:00
Åke Forslund 9245f551f4 Remove backwards compat. imports from lang tools
This removes the whole mycroft.util.lang submodule replacing it with a
minimum needed set of functions

extract_datetime: when a date was missing en-us would return the current date
to not mess up existing skills. This is no longer the case, if an
utterance doesn't contain a date the function will return None as
indicated by the docstring
2020-02-12 09:27:50 +01:00
Åke Forslund dd6732997b Remove the ConfigurationManager compatibility
ConfigurationManager has been deprecated since 0.9.4 so it's time to
remove it completely
2020-02-11 14:48:44 +01:00
Åke 47038f575e
Merge pull request #2462 from forslund/test/cqs
Tests for CommonQuerySkill
2020-02-07 08:34:18 +01:00
Åke 74c6a483fd
Merge pull request #2459 from forslund/test/common-play-skills
Common play skill tests
2020-02-07 08:33:54 +01:00
Åke d269a49a16
Merge pull request #2422 from forslund/refactor/dialog
Refactor mycroft.dialog
2020-02-07 08:33:25 +01:00
Åke Forslund f759903dcb Deprecate DialogLoader class
The DialogLoader class has been replaced by the simpler load_dialogs
function.
2020-02-05 17:04:37 +01:00
Åke Forslund dfc7c1df89 Refactoring of dialog module
- Move code out of __init__.py
- Correct spacing of docstrings
- Make use of ' uniform
- Add module level docstring
2020-02-05 17:04:28 +01:00
Åke Forslund 3fa6e6e309 Use wait_for_response to retreive track info 2020-02-05 13:13:17 +01:00
Åke Forslund 020ee329f6 Allow AudioService.queue to accept mime info 2020-02-05 13:13:17 +01:00
Åke Forslund b2c920f031 Minor docstring cleanup 2020-02-05 13:13:17 +01:00
Åke Forslund e6896e1831 Make audio accuracy test runable again
- Move to test directory
- Make runable module
- Add some waiting to give Wakeword engine time to report back
- Disable beep on found wakeword
- Update gitignore directory
2020-02-03 10:00:55 +01:00
devs-mycroft d49ca6d418 Version bump from 19.8.6 to 19.8.7 2020-01-30 10:02:56 +00:00
Åke Forslund 9c8c8e0144 Send time reference for "now" to Lingua-franca
This will provide timezone info as well as now reference to the
extracted sentences.
2020-01-29 15:33:28 +01:00
Åke Forslund 6740eea82c Fix formatting of docstrings 2020-01-26 18:17:37 +01:00
Åke Forslund 9abb00f681 Fix func checking if a platform supports visuals 2020-01-26 18:17:37 +01:00
Åke Forslund f77fe9de58 Remove test cases
The functionallity of lingua franca has been verified so the language
specific test cases aren't needed anymore. The base test cases for
english for format.py and parse.py is left as long as those remain as
part of the utils module.
2020-01-18 08:58:23 +01:00
Åke Forslund 37caf7837d Remove logic from format.py and parse.py
The functions are still there providing the docstrings but calling the
lingua_franca functions.

Note, there is a INTENTIONAL addition of an inconsistence. Making the
extract_datetime return todays date instead of None as is documented.
This needs to be removed as soon as the mycroft default skills have been
added.
2020-01-18 08:58:23 +01:00
Åke Forslund 1b5b4f3d84 Add wrapper for extract_datetime 2020-01-18 08:58:23 +01:00
Åke Forslund 2cc90f3f9f Remove functions from format.py and parse.py 2020-01-18 08:58:23 +01:00
Åke Forslund 32666e9d68 Remove content from lang specific files
The files are kept for backwards compatibility but these just contains imports
of lingua-franca versions of variables
2020-01-18 08:58:23 +01:00
Åke Forslund 1b88db4fa1 Replace format and parse calls with lingua-franca 2020-01-18 08:58:23 +01:00
devs-mycroft aa86e10ca3 Version bump from 19.8.5 to 19.8.6 2020-01-16 14:22:00 +00:00
Åke Forslund 97ff8a4708 Send mycroft.audio.queue_end
The message is sent when there are no more tracks in the queue and
playback has stopped.
2020-01-15 11:13:00 +01:00
Kris Gesling 1faedf6052
Merge pull request #2453 from forslund/doc/settings-changed-callback
Add readthedocs docs for settings_change_callback
2020-01-15 19:41:28 +09:30
Åke Forslund 1b88ebe508 Fix tracks with mime data for VLC backend 2020-01-15 09:06:50 +01:00
Åke Forslund efb9cd1a01 Pass listen flag to fallback tts 2020-01-15 09:06:50 +01:00
Åke Forslund e74b0e3900 Add audioservice method tests
This includes init, shutdown, play, stop, next, previous, pause,
seek_backward, seek_forward, queue lower_volume, restore_volume and resume.
2020-01-15 09:06:50 +01:00
Åke Forslund 9a36639ec7 Clean up mycroft/audio/__init__.py 2020-01-15 09:06:50 +01:00
Åke Forslund 9563bff162 Add readthedocs docs for settings_change_callback 2020-01-15 08:39:15 +01:00
Åke Forslund 8f6822278f Clean-up
tts.py:
- remove unused import
-remove unused variable
- init TTS thread enclosure member
mimic2_tts.py: Fix docstrings
mimic_tts: Fix docstrings and remove unused variables and imports
google_tts: Improve docstrings
2020-01-10 16:26:48 +01:00
Åke Forslund 93ff3d7651 Fix mimic2 text preprocessing 2020-01-10 16:26:48 +01:00
Åke Forslund 391b92ce56 Make Factory get Mimic TTS class from normal list
Removes duplicated code and makes method easier to test
2020-01-10 16:26:48 +01:00
Åke Forslund 72adf0465b Move code out of __init__.py 2020-01-10 15:27:07 +01:00
andlo 39de6b655e pep8 fix 2020-01-07 16:53:37 +00:00
andlo 7b4891d07a enable seting for patadious single_thread in mycroft.conf 2020-01-06 19:32:29 +00:00
Kris Gesling 97ec830177
Merge pull request #2447 from ansgar-t/dev
Prepare for gTTS 2.1.0
2020-01-06 19:58:28 +09:30
Ansgar Tuemmers c5b6987d0c Prepare for gTTS 2.1.0
Signature of gTTS.__init__ changes in 2.1.0 and breaks calls with
unnamed arguments like gTTS('some text', 'de')
2020-01-04 17:30:45 +01:00
Åke Forslund 555478c33f Add self.root_dir to readthedocs documentation 2020-01-03 10:45:39 +01:00
Sylvia van Os 555c2f897b
Fix documentation mistake 2019-12-26 22:28:58 +01:00
devs-mycroft cafffd8b62 Version bump from 19.8.4 to 19.8.5 2019-12-20 12:20:50 +00:00
Åke Forslund 9628a5b5f4 Fix settingsmeta upload start race condition 2019-12-19 10:03:36 +01:00
Åke Forslund d45edcd613 Add priority skill's settingsmeta 2019-12-19 10:03:14 +01:00
Åke ac874ecc88
Merge pull request #2432 from ChanceNCounter/time-resolution-cleanup
clean up nice_duration handler
2019-12-18 20:41:47 +01:00
Åke 184508a020
Merge pull request #2370 from forslund/feature/settingsmeta-queue
Stabilize skill settings download
2019-12-18 12:41:16 +01:00
Åke Forslund ec1d35d1b7 Fixes from code review
- Use reload status directly instead of instance check
- Move manifest posting to start_upload method
2019-12-18 12:05:40 +01:00
Åke Forslund 1e7314d7ca Update skill manifest when a skill is removed
When skills are removed the skills manifest is updated using msm and
then sent to the backend.
2019-12-18 12:05:40 +01:00
Åke Forslund 146a8c1434 Get skill_gid more reliably
If skill directory doesn't exist in current cache try to fetch a new
copy.
2019-12-18 12:05:40 +01:00
Åke Forslund f5685bde96 Simplify
Skip the queue thread, do upload in series with skill load/reload.
2019-12-18 12:05:40 +01:00
Åke Forslund fa1bdfdda7 Send manifest before starting settingsmeta upload.
Minor restructuring moving the enqueuing of settingsmeta upload to after
updating the skills manifest.
2019-12-18 12:05:40 +01:00
Åke Forslund c11c9756ce Add queue system to send settingsmeta
The queue will store all settingsmeta upload calls and execute them
after pairing can be verified.

Starts settings download after upload has started. When settings meta upload
has started for all skills the skill download process is triggered.

This guarantees that the settingsmeta skill_gid has been populated
properly before skills try to figure out which part of the skills data
belongs to them.

Add docstrings to upload queue
2019-12-18 12:04:57 +01:00
ChanceNCounter 4e8db9c860 clean up nice_duration handler
* Replace integer values with enum values for clarity
* Simplify exception thrown on incompatible input
* Pythonify (and de-Chanceify) zero-output logic
2019-12-17 05:10:34 -08:00
JarbasAI 46af6fcff2
mark1/fix display big images
https://github.com/MycroftAI/enclosure-mark1/blob/master/protocols.txt#L141

according to the spec there is a bug
2019-12-17 01:34:08 +00:00
Philipp Fischbeck 3f73fb50af
Fix typo in MycroftSkill documentation
Change "https://https://" to "https://"
2019-12-15 16:42:41 +01:00
Åke Forslund 308b0c5111 Fix incorrect porcupine shutdown and Exception
Flagged by flake8 after merge
2019-12-12 17:51:47 +01:00
Åke 3315d98582
Merge pull request #2139 from alumae/feature/issue-1491
Add support for the Porcupine wakeword engine.
2019-12-12 16:59:12 +01:00
Åke 2263fab0b6
Merge pull request #2418 from forslund/bugfix/missing-hotword-parts
Make sure hotword entry has phonemes and threshold
2019-12-09 20:24:58 +01:00
Åke Forslund 2697cb8d56 Create simple load_dialogs function
This function replaces the class since the class doesn't provide any
functionality
2019-12-09 09:35:01 +01:00
Åke Forslund 2fa81aac52 Disregard DEBUG entry in filter
The DEBUG, has been filtered by default. This will disregard the DEBUG
filter completely since the same effect can be achieved by setting the
debug level using ":log level debug".
2019-12-09 08:27:27 +01:00
Åke Forslund f9585e47ba Clean up of create_wake_word_recognizer
- Proper docstring
- " -> '
2019-12-07 20:22:20 +01:00
Åke Forslund 2c2c933832 Make sure hotword entry has phonemes and threshold
If hotword entry is missing either add from old listener location
2019-12-07 20:18:47 +01:00
Åke 24071cdea0
Merge pull request #2416 from MycroftAI/feature/gui-server-modern-tornado
Workaround for gui connection
2019-12-07 15:08:08 +01:00
Åke d25560a053
Merge pull request #2413 from ChanceNCounter/bug/extractnumber-en(#2110)
Fix extractnumber_en failure on "%" (#2110)
2019-12-07 09:29:05 +01:00
devs-mycroft 599fc57690 Version bump from 19.8.3 to 19.8.4 2019-12-06 11:30:19 +00:00
ChanceNCounter 5eb6b51eb2 Fix extractnumber_en failure on "%" (#2110)
Closes MycroftAI/mycroft-core#2110
2019-12-05 14:19:37 -08:00
domcross 7af161fd03 Fallback to 'en-us' when resource fails
When mycroft_skill.find_resource fails to load a resource for self.lang
fall back to lang 'en-us'
as most skills/resources are available in english by default.

==== Fixed Issues ====
2019-12-05 10:21:54 +01:00
Steve Penrod 2f4b2ccf48 Remove signal.SIGINT handler from simple CLI
At some point during refactoring the ability to hit Ctrl+C to exit the basic CLI was lost.

The signal.SIGINT handler is needed by the graphical GUI, but it
interfered with the use of sys.stdin.readline() in the simple CLI.
Rearrange the installation of the handler for only the GUI.

To test, run:
   mycroft-cli-client --simple
Then hit Ctrl+C.  Before this change nothing happens (you just see the "^C" printed out).  After the change it exits as expected.
2019-12-03 20:07:19 +01:00
Åke 21699294c7
Merge pull request #2395 from forslund/bugfix/hotword-loading
Fix using of hotword structure for custom wakeword
2019-12-03 14:19:55 +01:00
Åke e7d9e8be1b
Merge pull request #2402 from maxbachmann/cleanup
Improve speed of pronounce_number_en
2019-11-29 17:07:59 +01:00
maxbachmann 4174689906 improve runtime 2019-11-29 16:56:36 +01:00
Åke e6385720b3
Merge pull request #2396 from maxbachmann/python2cleanup
cleanup python2 unicode
2019-11-27 08:46:20 +01:00
Åke e78a9730e1
Merge pull request #2386 from maxbachmann/dev
Add more time idioms (half past, etc.)
2019-11-27 08:41:02 +01:00
maxbachmann 87220ee85c add some more time idioms 2019-11-27 01:53:23 +01:00
maxbachmann 7a48297132 cleanup python2 unicode 2019-11-26 23:09:32 +01:00
Åke Forslund 04e9812992 Asyncio updates for gui connections
- Workaround, ensure asyncio event loop is launched on each thread.
2019-11-26 14:21:49 +01:00
Åke 6bd6441da2
Merge pull request #2393 from MycroftAI/feature/geolocation-api
Feature/geolocation api
2019-11-26 11:10:05 +01:00
Åke Forslund 026f769028 Fix using of hotword structure for custom wakeword
Fixes overriding settings from listener config
2019-11-26 09:07:15 +01:00
Chris Veilleux db2fc40e3c Merge remote-tracking branch 'remotes/origin/dev' into feature/geolocation-api 2019-11-22 13:33:54 -06:00
Christian Clauss a1ff3fb355 Upgrade from pycodestyle to flake8 2019-11-19 23:07:52 +01:00
Åke Forslund 5e90465267 Improve guessing if http fetch fails.
If the server doesn't support getting the http head for the feed a 501
may be generated the guess_mime function will in turn fail if the url
ends with "?arg=x" or similar. This does an extra parsing step trying to
remove such arguments.
2019-11-19 16:34:13 +01:00
Åke Forslund f44165d35d Add exception handler if mime fails 2019-11-19 05:36:16 +01:00
Åke 17840decd5
Merge pull request #2385 from mikewoudenberg/dev
Add rudimentary Dutch parsing support
2019-11-15 11:44:31 +01:00
devs-mycroft 0314a3f6d1 Version bump from 19.8.2 to 19.8.3 2019-11-14 07:54:10 +00:00
Mike Woudenberg cc5631c45f Adds rudimentary Dutch parsing support 2019-11-14 08:47:36 +01:00
Daniel Morse 3751add193 Move emission of recognizer_loop:wakeword
The message is now emitted directly after a wakeword is detected.
2019-11-11 15:13:56 +01:00
Åke f1327f0973
Merge pull request #2376 from forslund/bugfix/shutdown-on-skill-remove
Fix Shutdown of removed skills
2019-11-07 23:08:45 +01:00
Åke caf3341812
Merge pull request #2375 from forslund/bugfix/remove-all-events
Fix reference leak when using bus.remove_all_listeners
2019-11-07 23:08:27 +01:00
Steve Penrod 0b8f7f54a4 Remove unnecessary code
The check for "this" performed in the case of "this quarter of an hour"
was copy/pasted in a large checkin.  The change it made to
daySpecified made no difference since the or in the later code
looked for an unspecified absolute hour.  I can come up with no
senseable phrase that matches the conditions and couldn't even
create a nonsensical phrase that made a difference.

Since all of the existing unit tests pass without this code,
I'm going to just remove it.
2019-11-04 09:39:09 +01:00
Kris Gesling 0197a7ee39 frames to read must be greater than 0 2019-11-01 08:13:26 +01:00
Chris Veilleux 183649ac5e Merge remote-tracking branch 'remotes/origin/dev' into feature/geolocation-api 2019-10-31 13:11:58 -05:00
Åke Forslund 3e905165e6 Fix Shutdown of removed skills
Verify that skill directory exists before writing to ensure that the
shutdown method doesn't throw exception if a skill is unloaded due to
being removed.
2019-10-31 11:40:41 +01:00
Åke 024274a5ca
Merge pull request #2372 from forslund/feature/speech-error-handling
Speech client error handling
2019-10-31 10:01:45 +01:00
Åke Forslund 3aea18c7be fix remove_all_events
The threaded event emitter did not remove the wrapper mapping when
remove_all_events were called causing trailing references to objects.
2019-10-31 09:42:24 +01:00
Åke Forslund d4a7193fe8 Remove circular reference during skill shutdown
This cleans up the extra skills references making the ref count trigger
correctly.
2019-10-31 09:38:46 +01:00
Åke 5f1cc40d0e
Merge pull request #2374 from forslund/feature/tts-create-error-handling
Fallback to Mimic if launch of TTS fails
2019-10-29 14:03:43 +01:00
Åke Forslund 39a38bc641 Move send function away from __main__ file
This resolves the Runtime Warning "'mycroft.messagebus.send' found in sys.modules after import of package 'mycroft.messagebus', but prior to execution of 'mycroft.messagebus.send'; this may result in unpredictable behaviour"
2019-10-29 09:14:49 +01:00
Åke Forslund c8328526b1 Fallback to Mimic if launch of TTS fails
Logs the exception and fallsback to Mimic as TTS backend if there is an
issue with the selected TTS backend or if the choice is invalid.
2019-10-28 14:20:01 +01:00
Åke Forslund 8d4413db9c Update account id fetching
Account ID will now be refetched if invalid the first time.

This also adds some general exception handling to avoid client crashing due
to the servers invalid 204 response.
2019-10-26 09:35:03 +02:00
Åke Forslund 8bdeddb965 Catch and log errors starting up the speech client 2019-10-26 09:34:28 +02:00
Åke Forslund 741cc1c8db Fallback to default STT if loading fails
If a STT backend fails to load log the exception and fallback to the
MycroftSTT.
2019-10-26 09:30:07 +02:00
Åke Forslund 0811df3831 Don't load remote settings for send command 2019-10-25 14:04:23 +02:00
devs-mycroft a3e35d736b Version bump from 19.8.1 to 19.8.2 2019-10-21 13:51:34 +00:00
Åke f234354783
Merge pull request #2365 from forslund/bugfix/lock-mic-mute-unmute
Lock mic mute unmute
2019-10-20 14:12:53 +02:00
Åke 2c1367f6f8
Merge pull request #2368 from MycroftAI/feature/restart-mic
Feature/restart mic
2019-10-20 14:06:06 +02:00
Åke Forslund bc2bfb6c77 Ignore overflow errors as before 2019-10-20 09:48:52 +02:00
Åke Forslund 3da5dece0c Stop restarting mic after 20 attempts 2019-10-20 09:47:12 +02:00
Åke Forslund 149a236e30 Attemt to restart the mic if there's an IOError
If mic produces an IOError try to restart the microphone's input stream
to recover.
2019-10-20 09:01:17 +02:00
Åke Forslund 6597ccc398 Send listen flag for special picroft case as well 2019-10-18 17:16:55 +02:00
Åke Forslund 5d8c3c6c92 Minor cleanup of mic docstrings, etc 2019-10-18 12:19:45 +02:00
Åke Forslund 9f555015e7 Add lock to mute unmute of mic stream
This should alleviate a potential (or possibly an existing) problem if
mute is triggered while reading of the mic occurs.
2019-10-18 12:12:48 +02:00
Åke Forslund 4bf0e89fb5 Update docstrings to match behaviour 2019-10-17 11:33:25 +02:00
ChanceNCounter 738ba6cf00 edit for pep8 compliance (#15) 2019-10-17 11:07:51 +02:00
jarbasal 978ece53ca feat/ask_selection 2019-10-17 11:07:51 +02:00
Åke 324fe988aa
Merge pull request #2356 from ChanceNCounter/spanish-language-parsers
fix bug in isFractional_es and improve coverage
2019-10-14 16:04:57 +02:00
devs-mycroft 913f29d3d5 Version bump from 19.8.0 to 19.8.1 2019-10-10 13:56:15 +00:00
David Wagner ddad8d1569 Pass listen to end_audio() 2019-10-10 12:11:11 +00:00
David Wagner feac64b2b0 Add listen arg to other TTS classes 2019-10-10 12:09:50 +00:00
David Wagner d9523fd30f Pass listen to end_audio() 2019-10-10 11:54:58 +00:00
David Wagner e45f527af3 Default to False 2019-10-10 11:50:48 +00:00
Åke 88e8b661e7
Merge pull request #2351 from forslund/feature/listen-on-last
Send listen on last sentence of utterance
2019-10-08 14:51:53 +02:00
David Wagner 1a9a51fe56
Merge pull request #2354 from forslund/bugfix/settings-delitem
Add missing __delitem__ method
2019-10-07 10:44:48 -05:00
Kris Gesling ab860306d3
Merge pull request #2353 from MycroftAI/bugfix/tail_scheduling_events
Remove event before running event handler
2019-10-07 21:55:29 +09:30
Åke 8126bcafce
Merge pull request #2346 from ChanceNCounter/tests/util-parse-en
fix bug, redundancy in parse_en; improve coverage
2019-10-07 13:22:23 +02:00
ChanceNCounter 1c41e523ce fix bug in isFractional_es and improve coverage
- Fix: isFractional_es() parsed fractions incorrectly
- Update: earlier commit msg suggested another fix:
  - Month parsing not fixed
  - Several failing tests (skipped) document problem
  - TODO and an issue also created
- Substantially improve parse_es.py test coverage
- TODO or comment several found bugs
  - Many lines remain uncovered, incl possible bugs
2019-10-05 14:46:09 -07:00
Åke Forslund 24d6cf9ea0 Add missing __delitem__ method
The delitem method is apparently used, for example by the alarm skill
2019-10-04 20:43:46 +02:00
Åke Forslund 08d38dea75 Remove event before running event handler
Allow events to reschedule themselves. The reference is removed before
the handler is executed to not remove anything added by the handler.
2019-10-04 18:29:11 +02:00
Åke Forslund abf8a90f07 Add description of the playback thread loop 2019-10-04 15:14:56 +02:00
Åke Forslund 29db163a78 Move listen trigger to last chunk of sentence
If rendering a chunk of a sentence takes too long time, the audio queue
may run out and trigger the listening.

This moves the listening trigger to after the last chunk.
2019-10-04 15:09:45 +02:00
Åke 8ffad68251
Merge pull request #2347 from ChanceNCounter/extractnumber-es-fix-and-add-extractnumbers
Fix extractnumber_es, add extract_numbers_es
2019-10-04 08:46:03 +02:00
Åke 90ceaa3c88
Merge pull request #2342 from ChanceNCounter/fix/convert-mixed-fraction-param-default
add default value to nice_number param
2019-10-04 08:43:15 +02:00
ChanceNCounter 1107f5d6cc Fix extractnumber_es, add extract_numbers_es
- Fix bug causing extractnumber_es to return a sum instead of a list
- Add Spanish parser to extract_numbers and extract_number

==== Fixed Issues ====
Closes #2310

====  Tech Notes ====
Further obscures #2056: short_scale and ordinals parameters added to the
Spanish parsers, but they don't do anything. Present for compat only.
There is a TODO for this.

==== Localization Notes ====
It's all Spanish stuff!

This will require a native Spanish speaker to analyze the relationship
between extractnumber and isFractional, and determine why certain
fractions do not parse correctly. There is a TODO for this.
2019-10-03 17:11:39 -07:00
ChanceNCounter 16d6bf4b22 fix bug, redundancy in parse_en; improve coverage
- Remove unreachable conditions from parse_en:1122-1133
  - input string passed through clean_string() on line 763
  - articles stripped from input before line 1122
  - removed conditions relied on presence of "the" in input
- Improved test coverage on parse_en.py by approx 65 statements
  - Directly test certain helper functions which are difficult to
invoke indirectly
  - Add tests for certain missed conditions
  - Approx. 20 uncovered statements remain
2019-10-03 14:41:21 -07:00
Åke 15233f8929
Merge pull request #2336 from forslund/feature/load-skill-settings-once
Remove duplicate load of skill settings
2019-10-03 19:46:11 +02:00
Åke Forslund b480dda90f Clean up docstrings
Minor cleanup of docstrings in the files affected by the previous commit
2019-10-03 19:13:02 +02:00
Åke Forslund 46b0b94631 Don't go through FS when triggering listener.
This adds a separate handler for triggering listening on the
"mycroft.mic.listen" message
2019-10-03 19:12:56 +02:00
ChanceNCounter 8c50fe9700 add optional 'clock' param for displayed output
Add one more optional parameter: bool clock, always produces
digital clock-like output. "0h 3m" becomes "0:03:00".

Has no effect on resolutions YEARS or DAYS, and MINUTES won't print hrs.
2019-10-02 07:55:22 +02:00
ChanceNCounter 4253929d2c - make nice_duration handle years, datetimes, and ms
- Companion enum:
mycroft.util.format.TimeResolution
offers YEARS, DAYS, HOURS, MINUTES, SECONDS, or MILLISECONDS

- Will only return ms if MILLISECONDS is chosen. Default: SECONDS

- Update tests
2019-10-02 07:55:22 +02:00