From bc9be869fd902abc2dfb747c53f0ff1e31fb078f Mon Sep 17 00:00:00 2001 From: builderjer <34875857+builderjer@users.noreply.github.com> Date: Sun, 5 Nov 2023 09:40:12 -0700 Subject: [PATCH 01/29] removed deprecated mimic3 (#81) --- ovos_config/mycroft.conf | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ovos_config/mycroft.conf b/ovos_config/mycroft.conf index 16a3381..c92e09c 100644 --- a/ovos_config/mycroft.conf +++ b/ovos_config/mycroft.conf @@ -607,7 +607,7 @@ "pulse_duck": false, // ovos tts server piper public servers by default, alan pope voice "module": "ovos-tts-plugin-server", - "fallback_module": "ovos-tts-plugin-mimic3-server", + "fallback_module": "", "ovos-tts-plugin-mimic": { "voice": "ap", // Add every new synth to the persistent cache (not cleared) @@ -619,17 +619,6 @@ "min_free_percent": 75, // How many times a utterance must be seen in order to be added to persistent cache "persist_thresh": 1 - }, - "ovos-tts-plugin-mimic3-server": { - // Add every new synth to the persistent cache (not cleared) - "persist_cache": false, - // Path to the persistent cached files, default will be $XDG_DATA_DIRS/mycroft/Mimic3ServerTTSPlugin - // (or respective TTS name) - "preloaded_cache": "", - // Curate the /tmp/tts cache if disk usage is above min % - "min_free_percent": 75, - // How many times a utterance must be seen in order to be added to persistent cache - "persist_thresh": 1 } }, From 14213885450a4f6371b748ec2ba1755957859c08 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Sun, 5 Nov 2023 16:40:25 +0000 Subject: [PATCH 02/29] Increment Version to 0.0.12a1 --- ovos_config/version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index 3cb95cb..c067092 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -1,6 +1,6 @@ # START_VERSION_BLOCK VERSION_MAJOR = 0 VERSION_MINOR = 0 -VERSION_BUILD = 11 -VERSION_ALPHA = 0 +VERSION_BUILD = 12 +VERSION_ALPHA = 1 # END_VERSION_BLOCK From 5db2ab4acc53afb05f655ffa30e21722b3d21741 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Sun, 5 Nov 2023 16:40:54 +0000 Subject: [PATCH 03/29] Update Changelog --- CHANGELOG.md | 113 ++------------------------------------------------- 1 file changed, 4 insertions(+), 109 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ad4593..49156d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,121 +1,16 @@ # Changelog -## [V0.0.11a15](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a15) (2023-10-24) +## [0.0.12a1](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a1) (2023-11-05) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a14...V0.0.11a15) - -**Merged pull requests:** - -- Minor dependency and logging updates [\#77](https://github.com/OpenVoiceOS/ovos-config/pull/77) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [V0.0.11a14](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a14) (2023-10-18) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a13...V0.0.11a14) - -**Merged pull requests:** - -- add max\_msg\_size [\#76](https://github.com/OpenVoiceOS/ovos-config/pull/76) ([JarbasAl](https://github.com/JarbasAl)) - -## [V0.0.11a13](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a13) (2023-09-18) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a12...V0.0.11a13) - -**Fixed bugs:** - -- fix remote config reload [\#74](https://github.com/OpenVoiceOS/ovos-config/pull/74) ([emphasize](https://github.com/emphasize)) - -## [V0.0.11a12](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a12) (2023-09-17) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a10...V0.0.11a12) - -**Merged pull requests:** - -- Fix typo'd "loosly" [\#72](https://github.com/OpenVoiceOS/ovos-config/pull/72) ([strugee](https://github.com/strugee)) -- \[cache\] Add persistent cache options [\#68](https://github.com/OpenVoiceOS/ovos-config/pull/68) ([goldyfruit](https://github.com/goldyfruit)) - -## [V0.0.11a10](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a10) (2023-08-22) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a9...V0.0.11a10) - -**Implemented enhancements:** - -- Update default translation plugin [\#66](https://github.com/OpenVoiceOS/ovos-config/pull/66) ([JarbasAl](https://github.com/JarbasAl)) - -## [V0.0.11a9](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a9) (2023-08-08) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a8...V0.0.11a9) - -**Fixed bugs:** - -- fix subclassing for deprecation [\#65](https://github.com/OpenVoiceOS/ovos-config/pull/65) ([JarbasAl](https://github.com/JarbasAl)) - -## [V0.0.11a8](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a8) (2023-08-08) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a7...V0.0.11a8) - -**Merged pull requests:** - -- Log deprecation of FileWatcher classes in `.utils` [\#64](https://github.com/OpenVoiceOS/ovos-config/pull/64) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [V0.0.11a7](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a7) (2023-08-07) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a6...V0.0.11a7) - -**Implemented enhancements:** - -- update config [\#63](https://github.com/OpenVoiceOS/ovos-config/pull/63) ([JarbasAl](https://github.com/JarbasAl)) - -## [V0.0.11a6](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a6) (2023-07-26) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a5...V0.0.11a6) - -**Merged pull requests:** - -- Add config path checks before mtime checks [\#62](https://github.com/OpenVoiceOS/ovos-config/pull/62) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [V0.0.11a5](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a5) (2023-07-21) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a4...V0.0.11a5) - -**Merged pull requests:** - -- Fix infinitely recursive callback [\#61](https://github.com/OpenVoiceOS/ovos-config/pull/61) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [V0.0.11a4](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a4) (2023-07-13) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a3...V0.0.11a4) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11...0.0.12a1) **Closed issues:** -- Some fields not updating as expected using single command line [\#58](https://github.com/OpenVoiceOS/ovos-config/issues/58) - -**Merged pull requests:** - -- change connectivity check urls [\#60](https://github.com/OpenVoiceOS/ovos-config/pull/60) ([JarbasAl](https://github.com/JarbasAl)) - -## [V0.0.11a3](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a3) (2023-07-04) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a2...V0.0.11a3) - -**Implemented enhancements:** - -- default g2p to ovos-g2p-plugin-heuristic-arpa [\#56](https://github.com/OpenVoiceOS/ovos-config/pull/56) ([JarbasAl](https://github.com/JarbasAl)) - -## [V0.0.11a2](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a2) (2023-07-04) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11a1...V0.0.11a2) - -**Implemented enhancements:** - -- document dinkum listener [\#57](https://github.com/OpenVoiceOS/ovos-config/pull/57) ([JarbasAl](https://github.com/JarbasAl)) - -## [V0.0.11a1](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.11a1) (2023-07-02) - -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.10...V0.0.11a1) +- Invalid JSON Error [\#79](https://github.com/OpenVoiceOS/ovos-config/issues/79) **Merged pull requests:** -- Update mycroft.conf [\#55](https://github.com/OpenVoiceOS/ovos-config/pull/55) ([JarbasAl](https://github.com/JarbasAl)) +- removed deprecated mimic3 [\#81](https://github.com/OpenVoiceOS/ovos-config/pull/81) ([builderjer](https://github.com/builderjer)) From e6105d4403731db50c2d2499e7b47eea5554368d Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Wed, 6 Dec 2023 23:54:24 +0000 Subject: [PATCH 04/29] Update locale.py (#84) fix https://github.com/OpenVoiceOS/ovos-config/issues/83 --- ovos_config/locale.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ovos_config/locale.py b/ovos_config/locale.py index 5214c56..994c9fe 100644 --- a/ovos_config/locale.py +++ b/ovos_config/locale.py @@ -81,8 +81,9 @@ def load_language(lang): def setup_locale(lang=None, tz=None): lang_code = lang or ovos_config.Configuration().get("lang", "en-us") + extra_lang_codes = ovos_config.Configuration().get("secondary_langs", []) # Load language resources, currently en-us must also be loaded at all times - load_languages([lang_code, "en-us"]) + load_languages([lang_code, "en-us"] + extra_lang_codes) # Set the active lang to match the configured one set_default_lang(lang_code) # Set the default timezone to match the configured one From e2a26c640ff1fb15250d2d5b275bea184924a2d1 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Wed, 6 Dec 2023 23:54:41 +0000 Subject: [PATCH 05/29] Increment Version to 0.0.12a2 --- ovos_config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index c067092..47d3f0c 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -2,5 +2,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 12 -VERSION_ALPHA = 1 +VERSION_ALPHA = 2 # END_VERSION_BLOCK From daa93f25fcf093a88b70b997b6081ccef059975e Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Wed, 6 Dec 2023 23:55:07 +0000 Subject: [PATCH 06/29] Update Changelog --- CHANGELOG.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49156d9..2e3051e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,21 @@ # Changelog -## [0.0.12a1](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a1) (2023-11-05) +## [0.0.12a2](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a2) (2023-12-06) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11...0.0.12a1) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a1...0.0.12a2) + +**Fixed bugs:** + +- Update locale.py [\#84](https://github.com/OpenVoiceOS/ovos-config/pull/84) ([JarbasAl](https://github.com/JarbasAl)) + +**Closed issues:** + +- Lingua franca lang specific format module isn't loaded. [\#83](https://github.com/OpenVoiceOS/ovos-config/issues/83) +- Errors loading tts when mimic3-server is not installed [\#80](https://github.com/OpenVoiceOS/ovos-config/issues/80) + +## [V0.0.12a1](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.12a1) (2023-11-05) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.11...V0.0.12a1) **Closed issues:** From 1a1d209212de15872ac5e2b503e386ed301f32a1 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Thu, 7 Dec 2023 19:51:59 +0000 Subject: [PATCH 07/29] feat/lang_utils (#85) helper utils to get valid languages based on mycroft.conf unified in a single util since it's starting to get used in a few different places also adds helper to turn a 2-letter lang code into a full 4-letter BCP lang code, taking into account dialect preferences from mycroft.conf --- ovos_config/locale.py | 47 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/ovos_config/locale.py b/ovos_config/locale.py index 994c9fe..952f1e2 100644 --- a/ovos_config/locale.py +++ b/ovos_config/locale.py @@ -1,4 +1,5 @@ from dateutil.tz import gettz, tzlocal + import ovos_config # lingua_franca is optional and might not be installed @@ -14,6 +15,39 @@ _default_tz = None +def get_full_lang_code(lang): + """ given a 2-letter lang code, return the full default 4-letter code""" + # first give preference to any configured dialects + # eg, pt-br instead of pt-pt + valid_langs = get_valid_languages() + for l in valid_langs: + if l.split("-")[0] == lang: + return l + + # just go with the default full code + langmap = {'az': 'az-az', + 'ca': 'ca-es', + 'cs': 'cs-cz', + 'da': 'da-dk', + 'de': 'de-de', + 'en': 'en-us', + 'es': 'es-es', + 'eu': 'eu-eu', + 'fa': 'fa-ir', + 'fr': 'fr-fr', + 'hu': 'hu-hu', + 'it': 'it-it', + 'nl': 'nl-nl', + 'pl': 'pl-pl', + 'pt': 'pt-pt', + 'ru': 'ru-ru', + 'sl': 'sl-si', + 'sv': 'sv-se', + 'tr': 'tr-tr', + 'uk': 'uk-ua'} + return langmap.get(lang) + + def get_primary_lang_code(config=None): global _lang if LF: @@ -79,11 +113,18 @@ def load_language(lang): LF.load_language(lang) +def get_valid_languages(): + """ return all valid runtime languages according to mycroft.conf """ + lang_code = ovos_config.Configuration().get("lang", "en-us") + extra_lang_codes = ovos_config.Configuration().get("secondary_langs", []) + return set([lang_code] + extra_lang_codes) + + def setup_locale(lang=None, tz=None): lang_code = lang or ovos_config.Configuration().get("lang", "en-us") - extra_lang_codes = ovos_config.Configuration().get("secondary_langs", []) - # Load language resources, currently en-us must also be loaded at all times - load_languages([lang_code, "en-us"] + extra_lang_codes) + valid_langs = get_valid_languages() + # load any lang specific resources + load_languages(valid_langs) # Set the active lang to match the configured one set_default_lang(lang_code) # Set the default timezone to match the configured one From ecb55bb5d69c6e2dfb82569a83fb18e823fd2fac Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 7 Dec 2023 19:52:16 +0000 Subject: [PATCH 08/29] Increment Version to 0.0.12a3 --- ovos_config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index 47d3f0c..9af9d7e 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -2,5 +2,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 12 -VERSION_ALPHA = 2 +VERSION_ALPHA = 3 # END_VERSION_BLOCK From ceaf637fe34dea7b25b23d83331ae4fcad3c802b Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 7 Dec 2023 19:52:41 +0000 Subject: [PATCH 09/29] Update Changelog --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e3051e..d777ce0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ # Changelog -## [0.0.12a2](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a2) (2023-12-06) +## [0.0.12a3](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a3) (2023-12-07) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a1...0.0.12a2) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a2...0.0.12a3) + +**Implemented enhancements:** + +- feat/lang\_utils [\#85](https://github.com/OpenVoiceOS/ovos-config/pull/85) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.12a2](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.12a2) (2023-12-06) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a1...V0.0.12a2) **Fixed bugs:** From ea8c6fe7620dc894a52fec479d14c634a5737ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Trellu?= Date: Mon, 18 Dec 2023 21:27:43 -0500 Subject: [PATCH 10/29] Force websocket to bind on 127.0.0.1 (#86) --- ovos_config/mycroft.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/mycroft.conf b/ovos_config/mycroft.conf index c92e09c..45daab8 100644 --- a/ovos_config/mycroft.conf +++ b/ovos_config/mycroft.conf @@ -331,7 +331,7 @@ // The mycroft-core messagebus websocket "websocket": { - "host": "0.0.0.0", + "host": "127.0.0.1", "port": 8181, "route": "/core", "ssl": false, From 36d1a34d26c75275ea4df664dc55dcc4782c40ce Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Tue, 19 Dec 2023 02:28:00 +0000 Subject: [PATCH 11/29] Increment Version to 0.0.12a4 --- ovos_config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index 9af9d7e..99cd3bb 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -2,5 +2,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 12 -VERSION_ALPHA = 3 +VERSION_ALPHA = 4 # END_VERSION_BLOCK From ae243470205cf1dfdc6cce260d463abe7028c158 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Tue, 19 Dec 2023 02:28:30 +0000 Subject: [PATCH 12/29] Update Changelog --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d777ce0..5099350 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ # Changelog -## [0.0.12a3](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a3) (2023-12-07) +## [0.0.12a4](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a4) (2023-12-19) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a2...0.0.12a3) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a3...0.0.12a4) + +**Fixed bugs:** + +- Force websocket to bind on 127.0.0.1 [\#86](https://github.com/OpenVoiceOS/ovos-config/pull/86) ([goldyfruit](https://github.com/goldyfruit)) + +## [V0.0.12a3](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.12a3) (2023-12-07) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a2...V0.0.12a3) **Implemented enhancements:** From f9ceb17600cfeae4e2793f4e26bbf714d02d53df Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Sat, 23 Dec 2023 14:46:22 +0000 Subject: [PATCH 13/29] fix/untangle_from_LF (#88) * fix/untangle_from_LF untangles configuration from lingua-franca, ovos-config should be the source of truth for everything config related fix: LF was optional, but if installed would stop core from loading if configured language was unsupported * Update locale.py --- ovos_config/locale.py | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/ovos_config/locale.py b/ovos_config/locale.py index 952f1e2..65258af 100644 --- a/ovos_config/locale.py +++ b/ovos_config/locale.py @@ -50,8 +50,6 @@ def get_full_lang_code(lang): def get_primary_lang_code(config=None): global _lang - if LF: - return LF.get_primary_lang_code() if not _lang: config = config or ovos_config.Configuration() _lang = config.get("lang", "en-us") @@ -65,8 +63,6 @@ def get_default_lang(config=None): @return: lowercase BCP-47 language code """ global _lang - if LF and LF.get_default_loc(): - return LF.get_default_loc() if not _lang: config = config or ovos_config.Configuration() _lang = config.get("lang", "en-us") @@ -74,11 +70,17 @@ def get_default_lang(config=None): def set_default_lang(lang): + """ setup default language across OVOS packages + + currently only configures lingua-franca language, in the future + other hooks may be added if we need to perform this operation globally""" global _lang _lang = lang if LF: - LF.set_default_lang(lang) - + try: + LF.set_default_lang(lang) + except: + pass def get_config_tz(): code = ovos_config.Configuration()["location"]["timezone"]["code"] @@ -91,7 +93,10 @@ def get_default_tz(): def set_default_tz(tz=None): - """ configure LF """ + """ configure timezone across OVOS packages + + currently only configures lingua-franca, in the future + other hooks may be added if we need to perform this operation globally """ global _default_tz tz = tz or get_config_tz() or tzlocal() _default_tz = tz @@ -104,13 +109,27 @@ def set_default_tz(tz=None): def load_languages(langs): + """ load and configure lang specific resources across OVOS packages + + currently only loads lingua-franca language data, in the future + other hooks may be added if we need to perform this operation globally""" if LF: - LF.load_languages(langs) + try: + LF.load_languages(langs) + except: + pass def load_language(lang): + """ load and configure lang specific resources across OVOS packages + + currently only loads lingua-franca language data, in the future + other hooks may be added if we need to perform this operation globally""" if LF: - LF.load_language(lang) + try: + LF.load_language(lang) + except: + pass def get_valid_languages(): @@ -121,6 +140,10 @@ def get_valid_languages(): def setup_locale(lang=None, tz=None): + """ setup default language, timezone and other locale data across OVOS packages + + currently only configures lingua-franca, in the future + other hooks may be added if we need to perform this operation globally""" lang_code = lang or ovos_config.Configuration().get("lang", "en-us") valid_langs = get_valid_languages() # load any lang specific resources From 0d522b93929232981530c7e3a72c5e421a147a9e Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Sat, 23 Dec 2023 14:46:39 +0000 Subject: [PATCH 14/29] Increment Version to 0.0.12a5 --- ovos_config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index 99cd3bb..bd002ec 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -2,5 +2,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 12 -VERSION_ALPHA = 4 +VERSION_ALPHA = 5 # END_VERSION_BLOCK From 4e520d63e8eededffe1da4e4b94af6d6f01059c6 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Sat, 23 Dec 2023 14:47:05 +0000 Subject: [PATCH 15/29] Update Changelog --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5099350..927a5a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ # Changelog -## [0.0.12a4](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a4) (2023-12-19) +## [0.0.12a5](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a5) (2023-12-23) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a3...0.0.12a4) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a4...0.0.12a5) + +**Fixed bugs:** + +- fix/untangle\_from\_LF [\#88](https://github.com/OpenVoiceOS/ovos-config/pull/88) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.12a4](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.12a4) (2023-12-19) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a3...V0.0.12a4) **Fixed bugs:** From a835b229801d12b82021075ca1547c4f0ce9687b Mon Sep 17 00:00:00 2001 From: Swen Gross <25036977+emphasize@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:04:30 +0100 Subject: [PATCH 16/29] fix circular import (#89) --- ovos_config/meta.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ovos_config/meta.py b/ovos_config/meta.py index 54ec089..98be842 100644 --- a/ovos_config/meta.py +++ b/ovos_config/meta.py @@ -52,7 +52,6 @@ import ovos_config.locations as _oloc from ovos_utils.json_helper import load_commented_json, merge_dict -from ovos_utils.log import LOG def get_ovos_config(): @@ -121,6 +120,8 @@ def get_ovos_default_config_paths(): eg. ["/etc/OpenVoiceOS/ovos.conf", "/home/user/.config/OpenVoiceOS/ovos.conf"] """ + from ovos_utils.log import LOG + paths = [] if isfile("/etc/OpenVoiceOS/ovos.conf"): paths.append("/etc/OpenVoiceOS/ovos.conf") @@ -140,6 +141,8 @@ def get_ovos_default_config_paths(): def is_using_xdg(): + from ovos_utils.log import LOG + """ BACKWARDS COMPAT: logs warning and always returns True""" LOG.warning("is_using_xdg has been deprecated! XDG specs are always honoured, this method will be removed in a future release") return True @@ -163,6 +166,8 @@ def set_xdg_base(folder_name): NOTE: this value will be set globally, per core overrides in ovos.conf take precedence """ + from ovos_utils.log import LOG + LOG.info(f"XDG base folder set to: '{folder_name}'") save_ovos_config({"base_folder": folder_name}) @@ -175,6 +180,8 @@ def set_config_filename(file_name, core_folder=None): NOTE: this value will be set globally, per core overrides in ovos.conf take precedence """ + from ovos_utils.log import LOG + if core_folder: set_xdg_base(core_folder) LOG.info(f"config filename set to: '{file_name}'") @@ -198,6 +205,8 @@ def set_default_config(file_path=None): NOTE: this value will be set globally, per core overrides in ovos.conf take precedence """ + from ovos_utils.log import LOG + file_path = file_path or _oloc.find_default_config() LOG.info(f"default config file changed to: {file_path}") save_ovos_config({"default_config_path": file_path}) From 96df7f9909c03659aec55661f951282d8ca44e51 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Wed, 27 Dec 2023 20:04:47 +0000 Subject: [PATCH 17/29] Increment Version to 0.0.12a6 --- ovos_config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index bd002ec..4793d43 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -2,5 +2,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 12 -VERSION_ALPHA = 5 +VERSION_ALPHA = 6 # END_VERSION_BLOCK From 9e157148e73fc43d08d38b84db49369fa8cd6834 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Wed, 27 Dec 2023 20:05:12 +0000 Subject: [PATCH 18/29] Update Changelog --- CHANGELOG.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 927a5a4..7f4f69a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,20 @@ # Changelog -## [0.0.12a5](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a5) (2023-12-23) +## [0.0.12a6](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a6) (2023-12-27) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a4...0.0.12a5) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a5...0.0.12a6) + +**Fixed bugs:** + +- fix circular import [\#89](https://github.com/OpenVoiceOS/ovos-config/pull/89) ([emphasize](https://github.com/emphasize)) + +**Closed issues:** + +- Exception fetching remote configuration: No module named 'ovos\_backend\_client' [\#75](https://github.com/OpenVoiceOS/ovos-config/issues/75) + +## [V0.0.12a5](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.12a5) (2023-12-23) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a4...V0.0.12a5) **Fixed bugs:** From fc425c5a0298f4d341f701b76396ba10b554fd02 Mon Sep 17 00:00:00 2001 From: Swen Gross <25036977+emphasize@users.noreply.github.com> Date: Thu, 28 Dec 2023 23:50:40 +0100 Subject: [PATCH 19/29] fix instant listen inline doc (#87) --- ovos_config/mycroft.conf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ovos_config/mycroft.conf b/ovos_config/mycroft.conf index 45daab8..0980e35 100644 --- a/ovos_config/mycroft.conf +++ b/ovos_config/mycroft.conf @@ -481,10 +481,9 @@ "recording_timeout": 10.0, "recording_timeout_with_silence": 3.0, - // instant listen is an experimental setting, it removes the need for - // the pause between "hey mycroft" and starting to speak the utterance, - // this setting might slightly downgrade STT accuracy depending on engine used - "instant_listen": true, + // Skips all checks (eg. audio service confirmation) after the wake_word is recognized and + // instantly continues to listen for a command + "instant_listen": false, // continuous listen is an experimental setting, it removes the need for // wake words and uses VAD only, a streaming STT is strongly recommended From 89c25210a583e48a815b70e6f322d062514d08ef Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 28 Dec 2023 22:50:54 +0000 Subject: [PATCH 20/29] Increment Version to 0.0.12a7 --- ovos_config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index 4793d43..059a189 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -2,5 +2,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 12 -VERSION_ALPHA = 6 +VERSION_ALPHA = 7 # END_VERSION_BLOCK From 66541998fc742a59bdd8a375d04bb156a3a65111 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 28 Dec 2023 22:51:21 +0000 Subject: [PATCH 21/29] Update Changelog --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f4f69a..b4e1dca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ # Changelog -## [0.0.12a6](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a6) (2023-12-27) +## [0.0.12a7](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a7) (2023-12-28) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a5...0.0.12a6) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a6...0.0.12a7) + +**Merged pull requests:** + +- fix instant listen inline doc [\#87](https://github.com/OpenVoiceOS/ovos-config/pull/87) ([emphasize](https://github.com/emphasize)) + +## [V0.0.12a6](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.12a6) (2023-12-27) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a5...V0.0.12a6) **Fixed bugs:** From 0b16d46877e7c20787c1a8d2b2e5a88dd54c41c5 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Thu, 28 Dec 2023 23:02:39 +0000 Subject: [PATCH 22/29] drop mycroft-core config location (#90) * drop mycroft-core config location * derprecated util * derprecated util * derprecated util --- ovos_config/locations.py | 15 +-------------- test/unittests/test_locations.py | 31 +++---------------------------- 2 files changed, 4 insertions(+), 42 deletions(-) diff --git a/ovos_config/locations.py b/ovos_config/locations.py index 5f80c58..fcfe712 100644 --- a/ovos_config/locations.py +++ b/ovos_config/locations.py @@ -99,20 +99,7 @@ def get_xdg_config_locations(): def find_default_config(): - """ find where mycroft is installed and return the path to the default mycroft.conf - if mycroft is not found then return the bundled file in ovos_config package""" - from ovos_utils.system import search_mycroft_core_location - try: - mycroft_root = search_mycroft_core_location() - if not mycroft_root: - raise FileNotFoundError("Couldn't find mycroft core root folder.") - cfg = join(mycroft_root, "mycroft", "configuration", "mycroft.conf") - if isfile(cfg): - return cfg - except FileNotFoundError: - pass - - # mycroft-core not found + """return the bundled file in ovos_config package""" return join(dirname(__file__), "mycroft.conf") diff --git a/test/unittests/test_locations.py b/test/unittests/test_locations.py index b8a890b..9a23c1a 100644 --- a/test/unittests/test_locations.py +++ b/test/unittests/test_locations.py @@ -60,36 +60,13 @@ def test_get_config_locations(self, config_path, webcache_loc, ['/test/default.yml', '/etc/test/test.yaml', 'webcache', '~/.test/test.yaml', 'config/test.yaml']) - @mock.patch("ovos_utils.system.search_mycroft_core_location") - def test_find_default_config(self, get_core): - from ovos_config.locations import find_default_config - - # No Core - get_core.return_value = None - no_core_default = find_default_config() - self.assertTrue(no_core_default.endswith("/ovos_config/mycroft.conf"), - no_core_default) - self.assertTrue(isfile(no_core_default), no_core_default) - - # # Invalid Core - # get_core.return_value = "/tmp" - # self.assertEqual(find_default_config(), - # "/tmp/mycroft/configuration/mycroft.conf") - - # Valid Core - get_core.return_value = dirname(__file__) - self.assertEqual(find_default_config(), - join(dirname(__file__), "mycroft", "configuration", - "mycroft.conf")) - - @mock.patch("ovos_utils.system.search_mycroft_core_location") + @mock.patch("ovos_config.meta.get_config_filename") @mock.patch("ovos_config.meta.get_xdg_base") @mock.patch("ovos_utils.system.is_running_from_module") @mock.patch("os.path.isfile") - def test_globals(self, fcheck, mod_check, xdg_base, config_filename, core_location): + def test_globals(self, fcheck, mod_check, xdg_base, config_filename): fcheck.return_value = True - core_location.return_value = "default/config/path" xdg_base.return_value = "test" config_filename.return_value = "test.yaml" mod_check.return_value = False @@ -111,9 +88,7 @@ def test_globals(self, fcheck, mod_check, xdg_base, config_filename, core_locati # Test all config paths respect environment overrides/configured values from ovos_config.locations import DEFAULT_CONFIG, SYSTEM_CONFIG, \ OLD_USER_CONFIG, USER_CONFIG, REMOTE_CONFIG, WEB_CONFIG_CACHE - self.assertEqual(DEFAULT_CONFIG, - "default/config/path/mycroft/configuration" - "/mycroft.conf") + self.assertEqual(SYSTEM_CONFIG, "mycroft/system/config") self.assertEqual(OLD_USER_CONFIG, expanduser("~/.test/test.yaml")) From fdd47fedf465c7e555f1822ce454a87b24803b25 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 28 Dec 2023 23:02:55 +0000 Subject: [PATCH 23/29] Increment Version to 0.0.12a8 --- ovos_config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index 059a189..75c585e 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -2,5 +2,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 12 -VERSION_ALPHA = 7 +VERSION_ALPHA = 8 # END_VERSION_BLOCK From bcb33f6abf8fb4309375f2b144b3f8bfbd1c5fe2 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 28 Dec 2023 23:03:17 +0000 Subject: [PATCH 24/29] Update Changelog --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4e1dca..542f122 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ # Changelog -## [0.0.12a7](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a7) (2023-12-28) +## [0.0.12a8](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a8) (2023-12-28) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a6...0.0.12a7) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a7...0.0.12a8) + +**Fixed bugs:** + +- drop mycroft-core config location [\#90](https://github.com/OpenVoiceOS/ovos-config/pull/90) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.12a7](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.12a7) (2023-12-28) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a6...V0.0.12a7) **Merged pull requests:** From e926ea531857c4994ed0e694082a8d4e3bececdd Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Thu, 28 Dec 2023 23:51:41 +0000 Subject: [PATCH 25/29] stable utils (#91) --- requirements/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 3efd680..863f583 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,5 +1,5 @@ PyYAML>=5.4.0,<7.0.0 combo_lock~=0.2 python-dateutil~=2.6 -ovos-utils < 0.1.0 +ovos-utils >= 0.0.37 rich-click ~=1.6 From fc1173989ceac2af0f2743198ca3824e70505a9d Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 28 Dec 2023 23:51:54 +0000 Subject: [PATCH 26/29] Increment Version to 0.0.12a9 --- ovos_config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index 75c585e..6bd081c 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -2,5 +2,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 12 -VERSION_ALPHA = 8 +VERSION_ALPHA = 9 # END_VERSION_BLOCK From 357ff619fc987c45d17664051f06514947b55056 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 28 Dec 2023 23:52:19 +0000 Subject: [PATCH 27/29] Update Changelog --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 542f122..864dd01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ # Changelog -## [0.0.12a8](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a8) (2023-12-28) +## [0.0.12a9](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a9) (2023-12-28) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a7...0.0.12a8) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a8...0.0.12a9) + +**Merged pull requests:** + +- stable utils [\#91](https://github.com/OpenVoiceOS/ovos-config/pull/91) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.12a8](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.12a8) (2023-12-28) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a7...V0.0.12a8) **Fixed bugs:** From 814bb2aec2763035bee9fc75f198756b1dadade9 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 28 Dec 2023 23:53:21 +0000 Subject: [PATCH 28/29] Increment Version to 0.0.12 --- ovos_config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_config/version.py b/ovos_config/version.py index 6bd081c..4e8dfb1 100644 --- a/ovos_config/version.py +++ b/ovos_config/version.py @@ -2,5 +2,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 12 -VERSION_ALPHA = 9 +VERSION_ALPHA = 0 # END_VERSION_BLOCK From 654d8b4fd2dee3f31944c4c2bb85cee7948c99d7 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 28 Dec 2023 23:53:54 +0000 Subject: [PATCH 29/29] Update Changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 864dd01..84ec512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [0.0.12a9](https://github.com/OpenVoiceOS/ovos-config/tree/0.0.12a9) (2023-12-28) +## [V0.0.12a9](https://github.com/OpenVoiceOS/ovos-config/tree/V0.0.12a9) (2023-12-28) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a8...0.0.12a9) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-config/compare/V0.0.12a8...V0.0.12a9) **Merged pull requests:**