Commit Graph

2739 Commits (a1fdae3415e9d3006e6a4348468058232bc13db0)

Author SHA1 Message Date
Å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
jamesmf b94b07b35b revert iot dig_for_message 2020-07-14 23:11:10 -04: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