Commit Graph

3096 Commits (dev)

Author SHA1 Message Date
Åke ab242a2c82
Handle multiple intents with the same name (#2921)
* Add check for duplicate adapt intents

There are two cases, duplicated named intent and duplicated anonymous intent.

A named intent will cause a ValueError exception notifying the skill
author that there is a collision.

An anonymous intent will silently derive a new name and use that
instead of the default generated one.

* Add tests for intent collisions

* Make enable/disable intent handle the new exception

The enable/disable intent did not mark an intent as detached, instead it
remained in the list of intents after disabling in the IntentServiceInterface
to be retrieved when the intent should be re-enabled.

This moves detached intents into a list of detached intents to so they
won't cause the double enable exception.

* Add move logic to find if intent is detached

MycroftSkill.enable_intent() will now check if the intent is detached
before trying to re-enable it.

* Lock updates of intents

This should avoid some race conditions that may occur if multiple
threads tries to enable / disable intents
2022-11-23 15:52:56 +09:30
Matthias Pfefferle 5f964f7d40 add german nose-word-list 2022-09-21 15:54:50 +09:30
Gaëtan Trellu 843909c328 Fix French language 2022-09-21 15:36:02 +09:30
Gaëtan Trellu 938092c77e Add French noise_words.list 2022-09-21 15:33:50 +09:30
amaciotta 6875bc9c19 Update yes.voc
Improvement italian translation.
2022-09-13 13:45:31 +09:30
Åke bf85e5c9c5
Remove the chromecast audio backend (#3097)
The pychromecast module is quite outdated and I think the backend would
fit better as a plugin now.
2022-04-20 07:01:30 +09:30
fsa317 ccd577bbf4
Issue-3006 replaced hot_words with hotwords to correctly lookup configuration (#3088) 2022-03-23 11:24:38 +09:30
Åke 5f4c68e583
Don't overwrite invalid json in config (#2881)
* Separate tests of LocalConf into new test class

* Do not overwrite configs with malformed json

If a config file is loaded and is invalid saves to that file will not be
possible until it's manually restored. The store accepts a force flag to
override this protection.

The method returns True if the store succeeded so call sites can
verbally report the issue as well.
2022-03-07 10:03:10 +09:30
Åke e7ddd51256
TTS playback queue singleton (#3055)
* fix issues when remote excepts out

* Remove explicit clear_cache from MimicTTS

* Updates for using singleton TTS playback thread

- Cache is called on all tts's registered as using the thread
- Begin audio and end audio is handled by the playback thread
- Further changes from self.playback to TTS.playback for consistency

* Remove redundant try/except

* Consolidate general and TTS-specific sentence splitting

This performs all sentence-splitting at the same stage. This fixes a
subtle issue where a TTS splits a sentence into chunks and throws an
error on only one of those chunks. The fallback would generate a
sentence for the original un-chunked sentence. possibly saying the same
parts twice.

This also pre-compiles the regexes used to speed things up a bit.

Co-authored-by: Ken <ken.smith@mycroft.ai>
2022-03-02 09:59:57 +09:30
Kris Gesling 36620af703
Remove inflection dependency (#3031)
The dependency was being used for a single string operation that is easily
replaced.
2022-03-01 07:46:21 +09:30
Daniel McKnight eb97bb339e
Add `supported_languages` parameter to STT and TTS base classes (#3059)
* Add `supported_languages` parameter to STT and TTS base classes

* Refactor `supported_languages` to `available_languages` and updated docstring to be more precise
2022-02-28 15:36:48 +09:30
Kris Gesling df0b8fe212 Remove mplayer audioservice
It is no longer supported by the projects maintainer.
2022-02-28 14:43:10 +09:30
Åke Forslund 8ee3e8d640 Add noise_words.list for Swedish 2022-02-24 10:22:57 +09:30
Åke Forslund e1731f53ec Remove unused imports from common_query_skill.py 2022-02-24 10:22:09 +09:30
Åke Forslund 3fa99f288f Handle missing noise words file in CQS
This treats a None result from resolve_resource_file() as a FileNotFound
exception.
2022-02-24 10:22:09 +09:30
Kris Gesling f556f84412
Add phonetic spellings for IP and Wikipedia (#3023)
Co-authored-by: jarbasal <jarbasai@mailfence.com>
2022-02-23 15:42:16 +09:30
Kris Gesling 1ae6900b26
Remove ResponsiveVoice TTS module from core (#3049)
This module in its current format does not work due to API changes.
There is also a community built plugin that is now described in our
documentation.
2022-02-23 15:40:53 +09:30
Aditya Mehra 5d88eb3a33
Fix: show text delegate as per autofit label refactor (#3065)
* fix show text delegate as per autofit label refactor

* Make rectangle containing text transparent

For different background colors, the background on the card should be set.

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2022-02-23 15:31:19 +09:30
Kris Gesling 3d963cee40
Merge pull request #3047 from forslund/feature/do-not-create-identity-folder
Do not create identity folder when trying to read the identity file
2021-12-13 10:07:11 +09:30
Kris Gesling 4061a04bb4
Merge pull request #3014 from putnik/dev
Update Russian words and dialogues
2021-12-13 10:05:51 +09:30
devs-mycroft 322a4c5599 Version bump from 21.2.1 to 21.2.2 2021-12-10 04:51:54 +00:00
Åke Forslund 4dd3dd3027 Add log if an exception loading identity occurs 2021-12-05 16:47:00 +01:00
Åke Forslund b342ab70c3 Only try to open the identity2.json if it exists 2021-12-05 16:46:39 +01:00
Kris Gesling ae99974398
Merge pull request #3045 from forslund/bugfix/config-creation-at-import
Do not create configs folders until writing
2021-12-01 09:17:41 +09:30
Kris Gesling d479a79b7e
Merge pull request #3033 from forslund/bugfix/config
Fix config priority
2021-12-01 09:13:28 +09:30
Å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 89cfad7943
Check if GUI is connected rather than maintain list of platforms (#3025)
* Check if GUI is connected rather than maintain list of platforms

There are already many Mycroft platforms that have GUIs
and this will only grow. We want to know if the device
has a GUI connected rather than if it is in a pre-defined
list of platforms.

* Create a mock GUI with a settable connected attribute
2021-11-24 14:51:10 +09:30
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
Åke Forslund 70df575d43 Make log settings not cache local only config
After startup the cached config would be without remote config. This
makes sure the config without remote isn't cached.
2021-11-09 21:04:58 +01:00
Åke Forslund 5ff2cb099f Fix order of configs
The old SYSTEM config was prioritized lower than the remote config
2021-11-09 20:51:38 +01:00
Genei180 ef56d71462
Added Possibility for ESpeak Config (#3020)
Added Possibility for ESpeak Config
2021-11-09 15:07:33 +09:30
Kris Gesling ea157598d7
Merge pull request #3022 from MycroftAI/bugfix/gui-namespace-race-cond
Fix race condition in GUI namespace insertion
2021-11-05 06:12:08 +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
Siavash Mollayi dca1184bd5 Azerbaijani language support 2021-11-03 15:57:34 +03:30
Sergey Leschina 9468c20558
Add more Russian phonetic spellings 2021-11-02 04:15:05 +03:00
Sergey Leschina 81de3d4c44
Update Russian words and dialogs 2021-11-02 04:15:04 +03:00
Gaëtan Trellu 0247b3a4b5
[log_format] Add an option to change the log format (#3016)
* [log_format] Add an option to change the log format

Hacing an option to change the log format could be useful when logs
are shipped into an aggregator such as Elasticsearch.

The current format is very hard to parse.

* [log_format] Set default Formatter

Because mycroft.configuration.Configuration() class import LOG class,
a default Formatter have to be defined before import the
mycroft.configuration.Configuration() class.
2021-10-29 14:59:22 +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
Kris Gesling 3495acf9ab
Merge pull request #3003 from Joanguitar/dev
Add reusable PadatiousMatcher to speed up intent matching
2021-10-21 12:25:34 +09:30
Chris Veilleux 5229f61bbf Fixed formatting error in skill loader log message 2021-10-15 14:51:05 -05:00
Kris Gesling 2a6bb90c9f
Merge pull request #2963 from forslund/feature/update-adapt-keyword-registration-message
Update key names in adapt keyword registration message
2021-09-27 10:30:12 +09:30
Åke Forslund f709bb9a1e Use IntentServiceInterface in MycroftSkill.register_vocabulary()
This moves the message logic for adapt keyword registration into a single location.
2021-09-26 19:15:21 +02:00
Åke Forslund 693100e8c6 Match keyword entity terms in Mycroft with Adapt
This changes the internally used names for entities and entity values when
sent on the messagebus and used interanally in the intent service from start / end to entity_value and entity_type.

This makes the terminology easier to understand and follow across into Adapt.

The old terms are still included and usable for compatibility but should be
removed in an upcoming major release (22.02).
2021-09-26 19:15:17 +02:00
ken-mycroft 5e81e2747b
Improve confidence calculation for Common Query (#2986)
* Improve confidence calculation

* Add actual noise words file

* Update expected test confidence levels

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2021-09-20 16:33:28 +09:30
Joan Palacios 0f98c566b9
Removed lru_cache 2021-09-16 13:31:22 -04:00
Joan 863e7844d1 Padatious doesn't need to run 3 times 2021-09-16 12:48:23 -04:00
Daniel McKnight 600aa76206
Add 'utterances' to message emitted to skill intent handler (#2997)
* Add 'utterances' to message emitted to skill intent handler

* Reformat comment to resolve PEP warnings

* Update comments per PR feedback

* Cut line-length for style compliance

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2021-09-13 11:15:57 +09:30
Chris Veilleux 06253906fc
Merge pull request #2979 from MycroftAI/bugfix/release-gui-on-shutdown
Release GUI on Skill shutdown or reload
2021-09-10 16:30:02 -05:00
Kris Gesling 4bce5345cb
Merge pull request #2985 from MycroftAI/feature/gTTS-warning
Add warning for anyone loading GoogleTTS
2021-09-07 16:09:05 +09:30
devs-mycroft 13539d3397 Version bump from 21.2.0 to 21.2.1 2021-08-27 03:02:54 +00:00