Commit Graph

702 Commits (dev)

Author SHA1 Message Date
Kris Gesling 7a9c762272
Merge pull request #2914 from forslund/feature/safer-tts-cache
Make TTSCache safer
2021-06-11 06:48:53 +09:30
Åke Forslund 4799caa696 Add test cases for tts cache __contains__ 2021-06-10 09:33:12 +02:00
Kris Gesling 8a3cb6eb88
Merge pull request #2741 from MycroftAI/bugfix/revert-vk-sleep
revert a temporary bugfix from PR #2626
2021-06-08 06:46:34 +09:30
Kris Gesling 1cc25da144
Merge pull request #2898 from MycroftAI/bugfix/docstring-cleanup
Cleanup of documentation
2021-06-01 12:16:44 +09:30
Kris Gesling 891784a454
Merge pull request #2888 from forslund/refactor/mimic_tts-dont-load-config-on-import
Refactor mimic_tts to not load config when importing
2021-05-28 15:24:13 +09:30
Kris Gesling e75a05557b docstring cleanup 2021-05-11 15:10:32 +09:30
Kris Gesling 6327ac5dbb
Upgrade Lingua Franca to v0.4.1 (#2890)
**Update Lingua Franca to v0.4.1**

The update from Lingua Franca v0.2.x to v0.4.x includes few
breaking changes.
- Some API methods have been updated.
- Mycroft-core tests have been updated to reflect improvements in
  Lingua Franca's formatting and parsing.
- add LF default lang setting method to config.locale 
  including warning that this method will change in the future
- Add TODO's for 21.08 - moving more methods to LF
- simplify loading and setting default of languages in Skills service
- Remove unneeded wrappers for Lingua Franca functions
- Fix documentation of format and parse utils
- Fix test warnings
2021-05-08 08:34:02 +09:30
Kris Gesling 088f563ad9
Merge pull request #2892 from MycroftAI/bugfix/consistent-temp-dir
Replace hardcoded use of /tmp directory
2021-05-08 07:28:27 +09:30
Kris Gesling 5d3b9d479b Fix test for expected TypeError 2021-05-07 15:34:37 +09:30
Kris Gesling dc4c146f69 Fix assigning of queue without existing loader 2021-05-06 10:11:39 +09:30
Åke Forslund 6dd059e888 Consume whole queue before considering skill done
This will handle any extra messages after the skill complete message was detected. For example messages from certain fallback skills
2021-05-02 09:27:47 +02:00
Åke Forslund 053d29b92c Use the correct event for fallback handler 2021-05-02 09:26:29 +02:00
Åke Forslund 512fa9c820 Implement wait_for_response for old skill tester
Previously this was just skipped over but is now needed for the fallback intents
2021-05-02 09:25:14 +02:00
Åke Forslund 3970f84e4b Fix Padatious setup
This was broken when Padatious moved from a separate "skill" into the
service manager. This updates the code to call the correct methods
2021-05-01 08:35:01 +02:00
Kris Gesling 0fb90edd28 Rename to get_temp_path and add docstring 2021-04-30 16:49:59 +09:30
Kris Gesling d9adf73db7 Add unit test for create_temp_file 2021-04-30 16:21:13 +09:30
dzekem christa 77d3969dc3 newline added 2021-04-30 14:48:15 +09:30
dzekem christa 241a8b89df pep8 error rectified 2021-04-30 14:48:15 +09:30
dzekem christa 4547752c66 minor errors fixed 2021-04-30 14:48:15 +09:30
dzekem christa 7765d11224 ran autopep8 2021-04-30 14:48:15 +09:30
dzekem christa 3f745c52ad created temp path function 2021-04-30 14:47:49 +09:30
dzekem christa d659179645 more fixes 2021-04-30 14:46:36 +09:30
dzekem christa 621b4ab650 spaces added and uniformity in code 2021-04-30 14:46:36 +09:30
dzekem christa 9252158829 rectified pep8 issues 2021-04-30 14:46:36 +09:30
dzekem christa 32f666edd4 Issue-2727 - fixing hard coded /tmp 2021-04-30 14:46:36 +09:30
dzekem christa a174c3c822 replaced hard coded /tmp 2021-04-30 14:46:36 +09:30
Åke Forslund 5d68309523 Refactor mimic_tts to not load config when importing
Hitting the entire configuration fetching routine with call to the
backend is not polite to do when just importing the file. This moves the
config lookup out of the global scope and into special functions for
finding the mimic binary and looking up the data path for the subscriber
voices.
2021-04-28 22:31:10 +02:00
Åke Forslund bea3bac2bf Make mimic get_tts() return phonemes pre-parsed
This makes the phonemes json de/encodable like mimic2
2021-04-05 08:28:38 +02:00
Åke Forslund 0b857e92f9 Sync tts cache dict of cached sentences on curate
This will make sure the dict of caches gets updated when curate_cache
removes files.
2021-03-21 13:33:08 +01:00
Åke Forslund 7bd27eb5df Make curate_cache() return removed files 2021-03-21 12:47:57 +01:00
Kris Gesling 7d3cb2d53e
Merge pull request #2869 from forslund/refactor/tts-cache-curation
Move TTS cache curation to TextToSpeechCache
2021-03-19 11:41:54 +09:30
Åke Forslund 9b4544dc7d Move cache curation to TextToSpeechCache 2021-03-18 23:02:26 +01:00
Kris Gesling cee879e7a4 Add exact optional param to voc_match
This adds the option to require an exact match of vocab. It sourced
from the Playback Control Skill.
2021-03-16 16:05:06 +09:30
Chris Veilleux bf2670c890
Merge pull request #2853 from MycroftAI/feature/consolidate_tts_cache
Consolidate TTS cache logic
2021-03-11 16:25:19 -06:00
Kris Gesling a399b19fd6
Merge pull request #2849 from forslund/refactor/clean-intent-service
Remove intent-service backwards compatibilities
2021-03-11 15:26:26 +09:30
Chris Veilleux ea013b26af Fixed failing unit test. 2021-03-10 21:16:34 -06:00
Chris Veilleux 86febca6a3 Fixed a bug passing None to an instance of Path 2021-03-10 15:35:38 -06:00
Chris Veilleux 5e90940896 new code to consolidate TTS cache handling into one module. 2021-03-10 13:38:17 -06:00
Kris Gesling 3679eb1355
Merge pull request #2838 from forslund/test/get_response-tests
get response tests
2021-03-10 23:44:48 +09:30
Åke Forslund 203e1fc740 Remove intent-service backwards compatibility
- Remove unused ContextManager import from mycroft.skills.intent_service
- Remove Old 'intent_failure' -> fallback handler
- Remove handling of fallback messages without the fallback_range
parameter
2021-03-07 12:59:59 +01:00
Kris Gesling 38839a1489
Merge pull request #1822 from forslund/feature/skill-api
Feature/skill api
2021-02-23 10:03:17 +09:30
Åke Forslund d724720b21 Basic tests for get_response based skill methods
- get_response
- ask_yesno
- ask_selection
2021-02-14 17:18:20 +01:00
Åke Forslund 53b9e87b21 Move AnyCallable to common location 2021-02-14 14:20:58 +01:00
Kris Gesling fa5576adf4
Merge pull request #2831 from MycroftAI/bugfix/google-voice
Upgrade gTTS to fix Google voice
2021-02-10 11:16:43 +09:30
Kris Gesling c8494932ac Remove deprecated Google TTS lang codes 2021-02-09 21:27:59 +09:30
Åke Forslund 9173e22460 Send correct conf to mimic when used as fallback
- Mimic is now sent the correct config when used as a fallback
- Tests updated to ensure this
2021-02-08 22:09:55 +01:00
Åke Forslund 56852594cc Add test cases for the SkillApi
- Tests for the MycroftSkill side implementation
- Tests for the generated SkillApi objects
2021-02-08 07:37:50 +01:00
Kris Gesling b1be522972
Merge pull request #2820 from MycroftAI/feature/gui-get
Feature/gui get
2021-02-05 14:41:03 +09:30
Kris Gesling cae1cb751f Extend GUI interface unittests 2021-02-04 16:12:22 +09:30
Kris Gesling bfe2b59f90 Add get method for accessing GUI values 2021-02-04 16:12:22 +09:30
Åke Forslund 166e36fa84 Improve logic when waiting for play calls
Add logic to ensure the play_* functions are called at least once before
checking the call status.
2021-02-01 23:02:34 +01:00
Åke Forslund 3ede156c98 Only stop speaking if speaking is active
This also updates the relevant testcase
2021-02-01 20:26:44 +01:00
Åke Forslund 93747a13ed Remove is_alive and all_loaded registration test 2021-01-28 17:24:21 +01:00
Åke Forslund eeb44ede9a Add test cases for ProcessStatus 2021-01-28 17:21:33 +01:00
Åke 99f43b964e
Merge pull request #2808 from MycroftAI/feature/vk-wait-for-service-msg
Add VK method to wait for audio service
2021-01-18 07:33:27 +01:00
Kris Gesling 89555380d8 Add VK method to wait for audio service 2021-01-18 11:16:41 +09:30
Åke Forslund 375adbbdf0 Make audioservice load backends without callback 2021-01-15 13:49:40 +01:00
Åke Forslund 83ed811dba Add check to make sure speak message has metadata
This can occur if a custom made speak message is injected and VK should
handle malformed speak messages.
2021-01-10 21:03:25 +01:00
Åke Forslund 35fd035337 Add timeout waiting for config change 2021-01-10 21:02:54 +01:00
JarbasAI f1d7141bf2
fix/intent_api (#2786)
* fix/fix/intent_api

* get active skills

* fix/intent_api

* fix/intent_api

* typos

Co-authored-by: jarbasal <jarbasai@mailfence.com>
2020-12-31 12:56:44 +09:30
Kris Gesling b0884301a3
Merge pull request #2734 from MycroftAI/feat/skill_settings_sync
skill settings sync flag
2020-12-02 10:45:45 +09:30
Åke Forslund 843de8b64f Base Mock config on the defualt config
This makes sure all config parameters are available.
2020-12-01 23:56:15 +11:00
Åke Forslund 21425da543 Add test for anonymous AdaptIntent 2020-11-24 11:02:52 +01:00
Kris Gesling 8b107ce733
Merge pull request #2742 from forslund/bugfix/vk-reset-config-spam
Fix Voight kampff reset of patched config
2020-11-06 14:38:28 +09:30
Åke Forslund dfe909aa2e Add a log for when config is patched
Since we have a reset log a matching info message for when updating the
config should be shown
2020-10-29 08:05:32 +01:00
Åke Forslund 3de34003cf Use custom cleanup to reset patched config
original_config will now only live in the scenario part of the context
being automatically cleared at the end of each scenario. To reset the
patch a custom cleanup is added when the patch is performed.
2020-10-29 08:05:28 +01:00
Kris Gesling e0c7016b4d revert a temporary bugfix from PR #2626 2020-10-28 16:30:10 +09:30
Åke Forslund 0a9de0ab7c Update to pyee 8.1.0
pyee 8.1.0 adds a small change to make the once call to be more safe in
multithreaded environments.

This switches back from the now deprecated BaseEventEmitter to the
standard EventEmitter.
2020-10-22 11:43:06 +02:00
Kris Gesling 8a1b989935
Merge pull request #2594 from forslund/feature/plugin-system
Plugin system for stt, tts, audioservices and wake word engines
2020-10-19 15:41:35 +09:30
Åke Forslund bb4e705d64 Add unittests for the plugin util 2020-09-23 07:46:13 +02:00
Kris Gesling ae72ebd247
Merge pull request #2599 from forslund/refactor/intent-service
Refactor intent service
2020-09-23 10:24:16 +09:30
katridi 6e197d0138
Bugfix/issue 2563 (#2692)
* Issue-2563 Added fallback to english model
* Added test case for checking config set up
* Added more descriptive log message
2020-09-22 15:01:01 +09:30
Åke Forslund 2debf2a7b7 Add basic test cases for gui interface 2020-09-18 07:26:21 +02:00
katridi a185a9a4bf
Issue-2567 - Fixing not initialized dialog_render (#2685)
Fixes #2567
2020-09-15 22:10:39 +09:30
Åke Forslund fc3d8ce801 Add MontonicEvent class
This handles jumps forward in time correctly
2020-09-10 13:26:25 +02:00
Kris Gesling 52b908f350
Merge pull request #2663 from forslund/feature/given-timeout
Voight Kampff given timeout
2020-09-09 14:32:25 +09:30
Kris Gesling 3eee84f053
Merge pull request #2679 from forslund/refactor/remove-imp
Refactor/remove imp
2020-08-24 01:28:34 +00:00
Åke Forslund e2a7fe9b2a Load test environment with importlib instead of imp 2020-08-21 08:00:57 +02:00
Kris Gesling a3a869b883
Merge pull request #2672 from MycroftAI/remove/string-utils
Remove unnecessary string utils
2020-08-21 00:32:08 +00:00
Kris Gesling cb2531c81c
Merge pull request #2671 from MycroftAI/remove/dialog-loader
remove deprecated DialogLoader class
2020-08-21 00:31:45 +00:00
Åke Forslund 8a8caa555d Add test cases for the api methods 2020-08-20 14:38:58 +02:00
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 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
Åke Forslund 9b4e47567e Add context parameter to wait_for_dialog
This allows wait for dialog to respect the timeout set for the current
scenario.
2020-08-16 23:34:29 +02:00
Åke Forslund 03002bcf47 Add "given a timeout of X seconds"
The new given sets the timeout of the steps in a scenario. The timeout is reset after each scenario.
2020-08-16 23:16:51 +02:00
Åke Forslund e93d23f0df Split out adapt from the intent_service. 2020-08-13 08:12:53 +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
Kris Gesling 6f33cc0553
Merge pull request #2626 from MycroftAI/bugfix/random-vk-fail
sleep after skills loaded for any final setup
2020-07-17 23:03:02 +09:30
Kris Gesling d4abc37861 sleep prior to tests to assist in bug diagnosis 2020-07-17 15:53:59 +09:30
Kris Gesling 77f1eaf3c8
Merge pull request #2541 from forslund/bugfix/jenkins-file-no-dockerfile-copy
CI: Use the docker -f flag instead of copying the Dockerfile
2020-07-07 16:15:21 +09:30
Å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 ff1f07288e Rename Dockerfile.test to Dockerfile 2020-07-01 07:22:50 +02:00
Kris Gesling 247c6d30a3 add test - specific skill should not reply 2020-06-18 22:33:22 +09:30
Å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
Åke Forslund e0e5f7fb2f Add test for cancelling the download timer 2020-05-27 22:08:14 +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