Commit Graph

706 Commits (refactor/python-detect)

Author SHA1 Message Date
Åke Forslund 6b5d45e507 Do not create configs folders until writing
This replaces save_*_path with usage of the xdg_*_home when handling
config files. This means the config folders will not be created unless
actually written to.

The check for whether a directory needs to be created is handled behind
a lock to avoid race conditions
2021-11-30 22:50:09 +01:00
Kris Gesling 77549d01e2
Remove incorrectly added args in GUIWebsocketHandler methods (#3036)
PR #2879 updated the websocket-client and changed function
signatures to account for API changes in that package. These
were falsely changed as the GUI bus does not use the
websocket-client.

Consistency would be good however modifying the protocols
would require significant work. For now we have two slightly
different bus interfaces.
2021-11-22 15:00:20 +09:30
jarbasal f8f640e3e5 fix/race condition dictionary changed iteration
bus events could cause the dict to change while being iterated
2021-11-04 13:37:54 +09:30
Bart Ribbers 34ee3a9a84
Upgrade websocket-client to 1.2.1 (#2879)
* Upgrade websocket-client to 1.2.1

core equivalent of https://github.com/MycroftAI/mycroft-messagebus-client/pull/21
There was an incompability with the latest websocket-client and the
messagebus which needed fixing for Linux distro compatibility. Since
messagebus-client was going to depend on websocket-client 1.2.1, let's
do the same in core

* Bump message bus client and tornado versions

New version of the messagebus-client released.
Upgraded Tornado to match new function signature.

* Revert removal of websocket-client

It is still used in the `mycroft.client.text.gui_server`

Should investigate removal of this so that websocket client versions do not need to be
kept in sync between mycroft-core and mycroft-messagebus-client.

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2021-10-28 14:42:23 +09:30
Åke Forslund 3fd96cf71b WIP Review comments
- Add TODO for 22.02 to remove the compatibility code
- Make Warning a single Log statement
- mycroft-config script now uses XDG-environment variable
- Remove redundant code
- Replace hard coded references to ~/.config
- Explicitly remove new path before move of "filesystem" (if needed)
2021-08-05 10:04:45 +02:00
Åke Forslund 9029dc1f41 Slight cleanup
- Make XDG usage more visible by using the xdg module prefix
- fix overloaded python keywords
- remove unused imports
2021-08-05 10:04:45 +02:00
Bart Ribbers e20443b824 Use XDG Base directories for settings, cache and runtime data
Improve deprecation warning message
2021-08-05 10:04:45 +02:00
Kris Gesling 0e2a78068a
Merge pull request #2910 from MycroftAI/feature/avx-check
Check for the AVX instruction set during install
2021-06-02 06:54:08 +09:30
mathmauney 305b93625a Update hotword_factory.py
Fix long line string
2021-05-28 21:48:49 +09:30
mathmauney 011c3899a9 Fix line too long 2021-05-28 21:48:49 +09:30
mathmauney 4ca656caac Issue-2232 Add warning when AVX is not detected and fallback. 2021-05-28 21:48:49 +09:30
Kris Gesling c936f2f116 Fix incorrect CLI info 2021-05-11 15:12:10 +09:30
Kris Gesling 083463a75e Clean up docstrings and CLI help info 2021-05-11 15:12:10 +09:30
Kris Gesling e75a05557b docstring cleanup 2021-05-11 15:10:32 +09:30
Kris Gesling 0fb90edd28 Rename to get_temp_path and add docstring 2021-04-30 16:49:59 +09:30
Kris Gesling d49ccc8b7a Fix typo and auto-format 2021-04-30 15:58:10 +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 304439ed4b minor fixes 2021-04-30 14:46:36 +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 1397659c77 Add skill api help to CLI 2021-02-06 17:57:38 +01:00
Åke Forslund 5df15245c4 Add Todo / comment regarding startup order 2021-01-28 17:24:21 +01:00
Kris Gesling 8a1ee0e106 Move ready check to enclosure; use ProcessStatus
Previously Mycroft reported mycroft.ready when Padatious had
finished it's first training run. This check has been shifted
to the enclosure service, and starts checking once the Padatious
training is complete.

Currently checks on readiness of audio, speech and skills services.
2021-01-28 17:24:21 +01:00
Kris Gesling 1273425799 add ProcessStatus to key services 2021-01-28 17:24:21 +01:00
Kris Gesling 73f0299cfa
Merge pull request #2722 from forslund/bugfix/latest-porcupine
Update for newer Porcupine engines
2021-01-25 16:29:48 +09:30
Kris Gesling 303f6a3b95
Merge pull request #2792 from MycroftAI/feature/common-bus-connection
Refactor - common bus connection method
2021-01-18 15:58:37 +09:30
Kris Gesling 974be29c57
Merge pull request #2781 from AIIX/fix/network_remove_pages
Fix missing remove page implementation, show idle if all pages removed
2021-01-11 21:58:22 +09:30
Aditya Mehra 7c2ca269e2 use mycroft.device.show.idle 2021-01-11 15:11:16 +05:30
Kris Gesling ad32a7a873 move bus connect method to process_utils 2021-01-11 16:57:25 +09:30
Kris Gesling 0423daeb4c Voice service to use common bus cilent method 2021-01-11 16:57:25 +09:30
Aditya Mehra eea66b4376 remove platform check and make the idle emit general 2021-01-06 13:20:17 +05:30
Kris Gesling 81eae60b61
Merge pull request #2758 from MycroftAI/refactor/enclosure-startup
Ensure messagebus is connected before reporting that the service is ready
2021-01-05 20:55:59 +09:30
Åke Forslund 9d450b5890 Unshadow Message class in _handle_pairing_complete
Fixes a small typo making the unmute after first pairing call fail.
2021-01-04 21:38:05 +01:00
Aditya Mehra 9ed6baef22 fix case indentation 2020-12-18 14:03:08 +05:30
Aditya Mehra 89a07d05ab Add missing remove page implementation and show idle if all pages removed 2020-12-18 12:52:44 +05:30
dalgwen 4747dd0e59 Fix UnboundLocalError in AudioProducer
==== Fixed Issues ====

====  Tech Notes ====
The variable should be declared outside the loop.
2020-12-15 10:16:34 +01:00
Åke Forslund 4b1efc7db9 Add deprecation notice 2020-12-13 21:53:01 +01:00
Åke Forslund 23cf197eb0 Pylint cleanup of imports and Porcupine class 2020-12-09 12:38:54 +01:00
Åke Forslund cb8c3fe7de Switch to using the pvporcupine pip package
This is the same set of bindings as previously but packaged and
published on pypi

Picovoce library finder functions are used to determine the location of
libraries.
2020-12-09 12:37:31 +01:00
Åke Forslund 32279894f2 Update for latest Porcupine release
- Update the creation of Porcupine object
- Update the detection to accept >= 0 (index of detected hot word)
2020-12-09 12:37:31 +01:00
Kris Gesling ce7331fbbb Ensure messagebus connected before reporting ready
Switch to new standard method to connect to bus client
Ensure exceptions during .run() are raised to the Enclosure service
Add missing .stop() method to base Enclosure Class
Shift call of .stop() to after exit signal
2020-11-12 16:41:37 +09:30
Åke Forslund 50f049032b Add docstrings for Hotword base class 2020-11-04 08:03:15 +01:00
Aditya Mehra 3a33284f62 add missing skill_id parameter for page interaction and focus events 2020-10-23 13:34:01 +05: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
jarbasal 02cb489f63 wake word plugins 2020-10-10 18:03:40 +01:00