From 72faad0779956e1b8377f8917b8c3a5b7752c47d Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Tue, 23 Aug 2022 19:30:16 -0700 Subject: [PATCH 01/44] Update alpha skills: (#276) neon-skill-fallback_wolfram_alpha neon-skill-stock Co-authored-by: Daniel McKnight --- requirements/skills_default.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/skills_default.txt b/requirements/skills_default.txt index fbbf4f342..e080e2774 100644 --- a/requirements/skills_default.txt +++ b/requirements/skills_default.txt @@ -3,12 +3,12 @@ skill-ddg @ git+https://github.com/openvoiceos/skill-ddg neon-skill-alerts~=1.0 neon-skill-caffeinewiz~=0.2 neon-skill-data_controls~=0.1 -neon-skill-fallback_wolfram_alpha~=0.0.1 +neon-skill-fallback_wolfram_alpha~=0.0.1,>=0.0.2a0 neon-skill-personal~=0.0.1 neon-skill-speak~=0.0.1 neon-skill-speed_test~=0.2 neon-skill-spelling~=0.0.1 -neon-skill-stock~=0.0.1 +neon-skill-stock~=0.0.1,>=0.0.2a0 neon-skill-support_helper~=0.0.1 # neon-skill-update neon-skill-user_settings~=0.0.1 From 68850f79cd9260fe95751e44c772259dd98d820d Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Wed, 24 Aug 2022 02:30:35 +0000 Subject: [PATCH 02/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 543d004d4..d00fa3451 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.2" +__version__ = "22.05.3a0" From d04f621c36d9115334f12f75426ded8149a21477 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Wed, 24 Aug 2022 13:11:10 -0700 Subject: [PATCH 03/44] Update default WW config (#275) * Update default WW config based on x86 testing (previously based on Pi testing) * Update default ww config to use fuzzy matching * Update neon_speech dependency spec * Troubleshooting speech module failures in unit tests * Bump speech module version spec Co-authored-by: Daniel McKnight --- neon_core/configuration/neon.yaml | 13 ++----------- requirements/client.txt | 2 +- requirements/core_modules.txt | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/neon_core/configuration/neon.yaml b/neon_core/configuration/neon.yaml index 6b8041c5f..b9b7aed25 100644 --- a/neon_core/configuration/neon.yaml +++ b/neon_core/configuration/neon.yaml @@ -106,19 +106,10 @@ hotwords: listen: true sound: snd/start_listening.wav debug: false + rule: fuzzy + lang: en samples: - hey neon - - hey neil - - hey near - - hey now - - hey india - - hey me or - - hey moron - - kenya - - the neon - - a neon - - the indian - - hey on thank you: module: ovos-ww-plugin-vosk sound: snd/acknowledge.mp3 diff --git a/requirements/client.txt b/requirements/client.txt index c39f3e86d..c006f1676 100644 --- a/requirements/client.txt +++ b/requirements/client.txt @@ -1,3 +1,3 @@ neon-transcripts-controller @ git+https://github.com/NeonGeckoCom/transcripts_controller -ovos-ww-plugin-vosk~=0.1 \ No newline at end of file +ovos-ww-plugin-vosk~=0.0,>=0.0.4 \ No newline at end of file diff --git a/requirements/core_modules.txt b/requirements/core_modules.txt index 188f65c2c..4a958801c 100644 --- a/requirements/core_modules.txt +++ b/requirements/core_modules.txt @@ -5,5 +5,5 @@ ovos-ww-plugin-pocketsphinx~=0.1.2 neon_messagebus~=0.2 neon_gui~=1.0 neon_enclosure~=1.0 -neon_speech~=2.0 +neon_speech~=2.0,>=2.0.1a1 neon_audio~=1.1 From d3203384e4b2b59397ab67141cb9ad8eb6f36692 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Wed, 24 Aug 2022 20:11:32 +0000 Subject: [PATCH 04/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index d00fa3451..20da0ecba 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a0" +__version__ = "22.05.3a1" From e349fb9f19f8ef1fd337fbdf713910fd1c8619fa Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Wed, 24 Aug 2022 16:49:04 -0700 Subject: [PATCH 05/44] Feat utterance normalization (#278) * Add utterance normalizer plugin to requirements.txt * Fix typo in dependency spec Co-authored-by: Daniel McKnight --- requirements/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 199912ac4..166a1b84a 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -13,6 +13,6 @@ psutil~=5.6 # default plugins neon-lang-plugin-libretranslate~=0.1,>=0.1.2 neon-utterance-translator-plugin~=0.1 - +neon-utterance-normalizer-plugin~=0.0.0,>=0.0.1a0 # text parser modules RAKEkeywords~=0.2 From 1321297318b72ad4c3b7bc8aa6c3fc53503f92ec Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Wed, 24 Aug 2022 23:49:26 +0000 Subject: [PATCH 06/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 20da0ecba..375160519 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a1" +__version__ = "22.05.3a2" From 8adb5f33937a1ae6393cf98657b7859e9093f399 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 29 Aug 2022 09:28:03 -0700 Subject: [PATCH 07/44] Add bus API method to get supported languages with unit test (#280) * Add `neon.get_languages_skills` handler Needs language plugin update in OPM * Add default config for utterance_transformers Update bus API for skill language support to match OVOS API Finish `handle_supported_languages` method with unit tests * Fix transformers service intent handling * Update dependency specs Cleanup changes Explicit config handling in unit tests * Remove libretranslate test dependency that is a core dependency * Revert invalid version bump Co-authored-by: Daniel McKnight --- neon_core/configuration/neon.yaml | 8 +++- neon_core/skills/intent_service.py | 26 ++++++++++-- requirements/requirements.txt | 2 +- requirements/test.txt | 3 +- test/test_skills_module.py | 68 ++++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+), 9 deletions(-) diff --git a/neon_core/configuration/neon.yaml b/neon_core/configuration/neon.yaml index b9b7aed25..875938c6b 100644 --- a/neon_core/configuration/neon.yaml +++ b/neon_core/configuration/neon.yaml @@ -1,6 +1,10 @@ # Plugin Configuration -text_parsers: - blacklist: [] +utterance_transformers: + neon_utterance_translator_plugin: + active: True + neon_utterance_normalizer_plugin: + active: True + audio_parsers: blacklist: - gender diff --git a/neon_core/skills/intent_service.py b/neon_core/skills/intent_service.py index 052954c24..7555c7d99 100644 --- a/neon_core/skills/intent_service.py +++ b/neon_core/skills/intent_service.py @@ -41,12 +41,14 @@ from neon_utils.log_utils import LOG from neon_utils.user_utils import apply_local_user_profile_updates from neon_utils.configuration_utils import get_neon_user_config -from ovos_utils.json_helper import merge_dict from lingua_franca.parse import get_full_lang_code from ovos_config.locale import set_default_lang from mycroft.skills.intent_service import IntentService - +try: + from neon_utterance_translator_plugin import UtteranceTranslator +except ImportError: + UtteranceTranslator = None # try: # if get_neon_device_type() == "server": # from neon_transcripts_controller.transcript_db_manager import\ @@ -62,7 +64,7 @@ class NeonIntentService(IntentService): def __init__(self, bus: MessageBusClient): super().__init__(bus) self.converse = NeonConverseService(bus) - self.config = Configuration.get().get('context', {}) + self.config = Configuration() self.language_config = get_lang_config() # Initialize default user to inject into incoming messages @@ -73,7 +75,7 @@ def __init__(self, bus: MessageBusClient): # self._setup_converse_handlers() - self.transformers = UtteranceTransformersService(self.bus) + self.transformers = UtteranceTransformersService(self.bus, self.config) self.transcript_service = None if Transcribe: @@ -83,6 +85,22 @@ def __init__(self, bus: MessageBusClient): LOG.exception(e) self.bus.on("neon.profile_update", self.handle_profile_update) + self.bus.on("neon.languages.skills", self.handle_supported_languages) + + def handle_supported_languages(self, message): + """ + Handle a request for supported skills languages + :param message: neon.get_languages_skills request + """ + translator = self.transformers.loaded_modules.get('neon_utterance_translator_plugin') + translate_langs = list(translator.translator.available_languages) if \ + translator and translator.translator else list() + + native_langs = list(self.language_config.get('supported_langs') or ['en']) + skill_langs = list(set(native_langs + translate_langs)) + self.bus.emit(message.response({"skill_langs": skill_langs, + "native_langs": native_langs, + "translate_langs": translate_langs})) def handle_profile_update(self, message): updated_profile = message.data.get("profile") diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 166a1b84a..09c7c52b8 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -6,7 +6,7 @@ neon-transformers~=0.1 ovos_utils~=0.0,>=0.0.23 ovos-config~=0.0,>=0.0.4 ovos-skills-manager~=0.0,>=0.0.11 -ovos-plugin-manager~=0.0.16 +ovos-plugin-manager~=0.0.16,>=0.0.19a1 psutil~=5.6 diff --git a/requirements/test.txt b/requirements/test.txt index 6a450d889..85d10341e 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,4 +1,3 @@ pytest pytest-cov -mock~=4.0 -neon-lang-plugin-libretranslate>=0.1.2 \ No newline at end of file +mock~=4.0 \ No newline at end of file diff --git a/test/test_skills_module.py b/test/test_skills_module.py index bd593c99c..7b150e26f 100644 --- a/test/test_skills_module.py +++ b/test/test_skills_module.py @@ -43,6 +43,7 @@ from mycroft_bus_client import Message from ovos_utils.messagebus import FakeBus from ovos_utils.xdg_utils import xdg_data_home +from ovos_plugin_manager.templates.language import LanguageTranslator sys.path.append(os.path.dirname(os.path.dirname(__file__))) @@ -52,6 +53,16 @@ def __init__(self, *_, **__): super().__init__() +class MockTranslator(LanguageTranslator): + def __init__(self): + super(MockTranslator, self).__init__() + self.supported_langs = [] + + @property + def available_languages(self) -> set: + return set(self.supported_langs) + + class TestSkillService(unittest.TestCase): config_dir = join(dirname(__file__), "test_config") @@ -157,15 +168,22 @@ def test_get_skill_dirs(self, skill_dirs, plugin_skills): class TestIntentService(unittest.TestCase): bus = FakeBus() + test_config_dir = join(dirname(__file__), "test_config") @classmethod def setUpClass(cls) -> None: + os.environ["XDG_CONFIG_HOME"] = cls.test_config_dir + from neon_utils.configuration_utils import init_config_dir + init_config_dir() + from neon_core import NeonIntentService cls.intent_service = NeonIntentService(cls.bus) @classmethod def tearDownClass(cls) -> None: cls.intent_service.shutdown() + os.environ.pop("XDG_CONFIG_HOME") + shutil.rmtree(cls.test_config_dir) def test_save_utterance_transcription(self): self.intent_service.transcript_service = Mock() @@ -253,6 +271,56 @@ def test_handle_utterance(self, patched): self.bus.emit(message) patched.assert_called_once_with(message) + def test_handle_supported_languages(self): + handled = Event() + response: Message = None + + def _handle_languages_response(msg): + nonlocal response + response = msg + handled.set() + + self.bus.on('neon.languages.skills.response', + _handle_languages_response) + + # Patch things + real_config = self.intent_service.language_config + translator = self.intent_service.transformers.loaded_modules.get( + 'neon_utterance_translator_plugin') + real_plug = translator.translator + translator.translator = MockTranslator() + + # Test default intent languages no translation + self.intent_service.language_config = { + 'supported_langs': None + } + translator.translator.supported_langs = [] + handled.clear() + self.bus.emit(Message('neon.languages.skills')) + handled.wait(3) + self.assertEqual(response.data['native_langs'], ['en']) + self.assertEqual(response.data['translate_langs'], []) + self.assertEqual(response.data['skill_langs'], ['en']) + + # Test supported languages and translation + translator.translator.supported_langs = ['en', 'pt', 'es'] + self.intent_service.language_config = { + 'supported_langs': ['en', 'uk', 'pt'] + } + handled.clear() + self.bus.emit(Message('neon.languages.skills')) + handled.wait(3) + self.assertEqual(response.data['native_langs'], ['en', 'uk', 'pt']) + self.assertEqual(set(response.data['translate_langs']), + {'en', 'pt', 'es'}) + self.assertEqual(set(response.data['skill_langs']), + {'en', 'pt', 'es', 'uk'}) + self.assertEqual(len(response.data['skill_langs']), + len(set(response.data['skill_langs']))) + + self.intent_service.language_config = real_config + translator.translator = real_plug + class TestSkillManager(unittest.TestCase): config_dir = join(dirname(__file__), "test_config") From cc79df3cbb898af908e4024aff1b0bdb1191aae6 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 29 Aug 2022 16:28:29 +0000 Subject: [PATCH 08/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 375160519..d3fa9949d 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a2" +__version__ = "22.05.3a3" From c4f9314f023bee0eac9062c2f68fe8fce7b26aac Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 29 Aug 2022 16:18:36 -0700 Subject: [PATCH 09/44] Update user settings skill (#281) * Update user settings skill * Update skill-user_settings version spec Co-authored-by: Daniel McKnight --- requirements/skills_default.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/skills_default.txt b/requirements/skills_default.txt index e080e2774..c32c1c724 100644 --- a/requirements/skills_default.txt +++ b/requirements/skills_default.txt @@ -11,6 +11,6 @@ neon-skill-spelling~=0.0.1 neon-skill-stock~=0.0.1,>=0.0.2a0 neon-skill-support_helper~=0.0.1 # neon-skill-update -neon-skill-user_settings~=0.0.1 +neon-skill-user_settings~=0.0.1,>=0.0.2a1 neon-skill-weather~=0.0.1 -neon-skill-wikipedia~=0.3 \ No newline at end of file +neon-skill-wikipedia~=0.3 From cd823eed94dfa514d4af76ac3b506c2601cd5c76 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 29 Aug 2022 23:18:57 +0000 Subject: [PATCH 10/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index d3fa9949d..c42d462a1 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a3" +__version__ = "22.05.3a4" From 38a3cc4880a37b450a141c55072890c25acbdc4a Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 29 Aug 2022 16:19:27 -0700 Subject: [PATCH 11/44] Update documentation from troubleshooting experience (#279) Add default MQ config override in Docker example Co-authored-by: Daniel McKnight --- README.md | 8 ++++++++ docker/config/neon.yaml | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8ee436e6a..5cded0740 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Neon Core is only tested on Ubuntu, but should be compatible with any linux dist > *Note*: By default, only the `root` user has permissions to interact with Docker under Ubuntu. > To allow the current user to modify Docker containers, you can add them to the `docker` group with: +> > `sudo usermod -aG docker $USER && newgrp` ## b. Running Neon @@ -42,6 +43,13 @@ assume that the repository is cloned to: `~/NeonCore`. > *Note*: The `docker` directory includes required hidden files. If you copy files, make sure to include any hidden > files. In must Ubuntu distros, you can toggle hidden file visibility in the file explorer with `CTRL` + `h`. +> *Note*: If you run `docker` commands with `sudo`, make sure to use the `-E` flag to preserve runtime envvars. + +> *Note*: Some Docker implementations don't handle relative paths. +> If you encounter errors, try updating the paths in `.env` to absolute paths. +> Also note that any environment variables will override the default values in `.env`. +> In BASH shells, you can list all current envvars with `env` + You can start all core modules with: ```shell # cd into the directory containing docker-compose.yml diff --git a/docker/config/neon.yaml b/docker/config/neon.yaml index d6468ee27..6fe881b0e 100644 --- a/docker/config/neon.yaml +++ b/docker/config/neon.yaml @@ -12,6 +12,6 @@ ready_settings: - speech - audio - gui -#MQ: -# server: mq.2021.us -# port: 25672 \ No newline at end of file +MQ: + server: mq.2021.us + port: 25672 \ No newline at end of file From cd64a85f730dbeffb9de8653cd8fcacd43d2ec78 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 29 Aug 2022 23:19:48 +0000 Subject: [PATCH 12/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index c42d462a1..1b0a6469d 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a4" +__version__ = "22.05.3a5" From b0ba2071d0891b3529c46fc7e543321e03e2a326 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Wed, 31 Aug 2022 15:33:50 -0700 Subject: [PATCH 13/44] Config Fixes and Docker Updates (#284) * Move config overlay files to `/etc/xdg` * Troubleshooting configuration test failures * Update neon_utils dependency spec * Fix typo in default config file path Co-authored-by: Daniel McKnight --- docker_overlay/etc/{ => xdg}/OpenVoiceOS/ovos.conf | 2 +- docker_overlay/etc/{ => xdg}/neon/neon.yaml | 0 requirements/requirements.txt | 2 +- test/test_configuration.py | 4 +++- 4 files changed, 5 insertions(+), 3 deletions(-) rename docker_overlay/etc/{ => xdg}/OpenVoiceOS/ovos.conf (74%) rename docker_overlay/etc/{ => xdg}/neon/neon.yaml (100%) diff --git a/docker_overlay/etc/OpenVoiceOS/ovos.conf b/docker_overlay/etc/xdg/OpenVoiceOS/ovos.conf similarity index 74% rename from docker_overlay/etc/OpenVoiceOS/ovos.conf rename to docker_overlay/etc/xdg/OpenVoiceOS/ovos.conf index c6b9d7ebd..584733eb8 100644 --- a/docker_overlay/etc/OpenVoiceOS/ovos.conf +++ b/docker_overlay/etc/xdg/OpenVoiceOS/ovos.conf @@ -4,7 +4,7 @@ "xdg": true, "base_folder": "neon", "config_filename": "neon.yaml", - "default_config_path": "/neon_core/configuration/neon.yaml" + "default_config_path": "/neon_core/neon_core/configuration/neon.yaml" } }, "submodule_mappings": { diff --git a/docker_overlay/etc/neon/neon.yaml b/docker_overlay/etc/xdg/neon/neon.yaml similarity index 100% rename from docker_overlay/etc/neon/neon.yaml rename to docker_overlay/etc/xdg/neon/neon.yaml diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 09c7c52b8..4196b3339 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,7 +1,7 @@ # mycroft ovos-core[skills_lgpl]~=0.0.4 # utils -neon-utils[network,configuration]~=1.0,>=1.0.2 +neon-utils[network,configuration]~=1.0,>=1.0.3a3 neon-transformers~=0.1 ovos_utils~=0.0,>=0.0.23 ovos-config~=0.0,>=0.0.4 diff --git a/test/test_configuration.py b/test/test_configuration.py index 5f1cfcb26..73caab729 100644 --- a/test/test_configuration.py +++ b/test/test_configuration.py @@ -52,11 +52,13 @@ def setUpClass(cls) -> None: "OpenVoiceOS", "ovos.conf")) from neon_core.util.runtime_utils import use_neon_core - from ovos_utils.configuration import get_ovos_config + from ovos_config.meta import get_ovos_config + from neon_core.configuration import Configuration ovos_config = use_neon_core(get_ovos_config)() LOG.info(pformat(ovos_config)) assert ovos_config['config_filename'] == 'neon.yaml' assert os.path.basename(ovos_config['default_config_path']) == "neon.yaml" + assert Configuration.default.path == ovos_config['default_config_path'] @classmethod def tearDownClass(cls) -> None: From a7087445bca0a6714f9b46545123f25ef7553bd7 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Wed, 31 Aug 2022 22:34:17 +0000 Subject: [PATCH 14/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 1b0a6469d..3ece933d0 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a5" +__version__ = "22.05.3a6" From 9d76f57167dbfc35763469f6cdb4b2017239d05a Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Tue, 6 Sep 2022 15:58:35 -0700 Subject: [PATCH 15/44] Add XDG directory mapping with default FS in container (#283) * Add XDG directory mapping with default FS in container * Update default XDG paths in docker-compose.yml Spec XDG paths in Dockerfile * Update docker config overlay files Update neon_utils dependency spec * Add demo files as docker resource overlay examples * Revert excess changes * Cleanup changes * Cleanup default config * Add default homescreen skill settings.json Update README Update gitignore * Fix typo in XDG_DATA_HOME envvars Add XDG_CACHE_HOME mapping * Move default config back to proper path * Add .dockerignore file to exclude docker XDG dir from builds * Remove completed TODO from docker-compose.yml * Add mounted cache directory to documentation Co-authored-by: Daniel McKnight --- .dockerignore | 1 + .gitignore | 8 ++++- README.md | 27 +++++++++++++---- docker/.env | 3 +- docker/config/neon.yaml | 3 -- docker/docker-compose.yml | 30 +++++++++++++++++-- .../settings.json | 8 +++++ .../locale/en-us/gui_demo.txt | 4 +++ .../locale/en-us/language_demo.txt | 25 ++++++++++++++++ .../etc/{xdg => }/OpenVoiceOS/ovos.conf | 4 +-- docker_overlay/etc/{xdg => }/neon/neon.yaml | 0 11 files changed, 98 insertions(+), 15 deletions(-) create mode 100644 .dockerignore create mode 100644 docker/xdg/config/neon/skills/skill-homescreen-lite.openvoiceos/settings.json create mode 100644 docker/xdg/data/neon/resources/skill-demo.neongeckocom/locale/en-us/gui_demo.txt create mode 100644 docker/xdg/data/neon/resources/skill-demo.neongeckocom/locale/en-us/language_demo.txt rename docker_overlay/etc/{xdg => }/OpenVoiceOS/ovos.conf (75%) rename docker_overlay/etc/{xdg => }/neon/neon.yaml (100%) diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..6d0eac4b3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +docker \ No newline at end of file diff --git a/.gitignore b/.gitignore index 82686ea67..69d108d21 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,10 @@ test_conf.json # Neon dev files .*.tmp -./ngi*.yml \ No newline at end of file +./ngi*.yml + +# Docker files +docker/xdg/* +docker/skills/* +docker/config/* +!docker/config/neon.yaml diff --git a/README.md b/README.md index 5cded0740..6d5bb39a1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # Table of Contents 0. [Quick Start](#quick-start) + * [a. Prerequisite Setup](#a-prerequisite-setup) + * [b. Running Neon](#b-running-neon) + * [c. Interacting with Neon](#c-interacting-with-neon) + * [d. Skill Development](#d-skill-development) + * [e. Persistent Data](#e-persistent-data) 1. [Optional Service Account Setup](#optional-service-account-setup) * [a. Google Cloud Speech](#a-google-cloud-speech-setup) * [b. Amazon Polly and Translate](#b-amazon-polly-and-translate-setup) @@ -108,12 +113,22 @@ to: image: ghcr.io/neongeckocom/neon_skills:dev ``` -## e. Configuration -The `neon.yaml` file included in the `docker` directory contains a default configuration -that may be modified to specify different plugins and other runtime settings. -The `docker` directory is mounted read-only to `/config` in each of the containers, -so model files may be placed there and the configuration updated to use different STT/TTS plugins with -local models. +## e. Persistent Data +The `xdg/config` directory is mounted to each of the Neon containers as `XDG_CONFIG_HOME`. +`xdg/config/neon/neon.yaml` can be modified to change core configuration values. +`xdg/config/neon/skills` contains settings files for each loaded skill + +The `xdg/data` directory is mounted to each of the Neon containers as `XDG_DATA_HOME`. +`xdg/data/neon/filesystem` contains skill filesystem files. +`xdg/data/neon/resources` contains user skill resource files. + +The `xdg/cache` directory is mounted to each of the Neon containers as `XDG_CACHE_HOME`. +Any cache information should be recreated as needed if manually removed and includes things like +STT/TTS model files, TTS audio files, and other downloaded files. + +> *Note*: When Docker creates files on the host filesystem, they are owned by `root`. +> In order to modify anything in the `xdg` directory, you may need to take ownership with: +> `sudo chown -R $USER:$USER xdg` # Optional Service Account Setup There are several online services that may be used with Neon. Speech-to-Text (STT) and Text-to-Speech (TTS) may be run diff --git a/docker/.env b/docker/.env index f1b9f7e56..de60f8c40 100644 --- a/docker/.env +++ b/docker/.env @@ -1,2 +1,3 @@ NEON_SKILLS_DIR=./skills/ -NEON_CONFIG_PATH=./config/ \ No newline at end of file +NEON_CONFIG_PATH=./config/ +NEON_XDG_PATH=./xdg \ No newline at end of file diff --git a/docker/config/neon.yaml b/docker/config/neon.yaml index 6fe881b0e..b610554fc 100644 --- a/docker/config/neon.yaml +++ b/docker/config/neon.yaml @@ -1,6 +1,3 @@ -play_wav_cmdline: "play %1" -play_mp3_cmdline: "play %1" -play_ogg_cmdline: "play %1" websocket: host: neon-messagebus gui_websocket: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 93dc1a4ed..2275f089b 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,4 +1,3 @@ -# TODO: Handle XDG_CONFIG_HOME envvar for persistent mounted config version: '3.1' networks: neon-core: @@ -8,6 +7,11 @@ volumes: type: config o: bind device: ${NEON_CONFIG_PATH} + xdg: + driver_opts: + type: xdg + o: bind + device: ${NEON_XDG_PATH} services: neon-messagebus: container_name: neon-messagebus @@ -20,6 +24,11 @@ services: - messagebus volumes: - config:/config:ro + - xdg:/xdg:rw + environment: + - XDG_CONFIG_HOME=/xdg/config + - XDG_DATA_HOME=/xdg/data + - XDG_CACHE_HOME=/xdg/cache neon-speech: container_name: neon-speech image: ghcr.io/neongeckocom/neon_speech:dev @@ -29,9 +38,13 @@ services: - config:/config:ro - ~/.config/pulse/cookie:/tmp/pulse_cookie:ro - ${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro + - xdg:/xdg:rw environment: - PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native - PULSE_COOKIE=/tmp/pulse_cookie + - XDG_CONFIG_HOME=/xdg/config + - XDG_DATA_HOME=/xdg/data + - XDG_CACHE_HOME=/xdg/cache devices: - /dev/snd:/dev/snd neon-skills: @@ -46,9 +59,13 @@ services: - ~/.config/pulse/cookie:/tmp/pulse_cookie:ro - ${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro - ${NEON_SKILLS_DIR}:/skills:ro + - xdg:/xdg:rw environment: - PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native - PULSE_COOKIE=/tmp/pulse_cookie + - XDG_CONFIG_HOME=/xdg/config + - XDG_DATA_HOME=/xdg/data + - XDG_CACHE_HOME=/xdg/cache devices: - /dev/snd:/dev/snd neon-audio: @@ -62,10 +79,14 @@ services: - ${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro - /run/dbus/system_dbus_socket:/run/dbus/system_dbus_socket:rw - /tmp/.X11-unix:/tmp/.X11-unix:ro + - xdg:/xdg:rw environment: - PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native - PULSE_COOKIE=/tmp/pulse_cookie - DISPLAY=${DISPLAY} + - XDG_CONFIG_HOME=/xdg/config + - XDG_DATA_HOME=/xdg/data + - XDG_CACHE_HOME=/xdg/cache devices: - /dev/snd:/dev/snd neon-gui: @@ -78,4 +99,9 @@ services: ports: - 18181:18181 volumes: - - config:/config:ro \ No newline at end of file + - config:/config:ro + - xdg:/xdg:rw + environment: + - XDG_CONFIG_HOME=/xdg/config + - XDG_DATA_HOME=/xdg/data + - XDG_CACHE_HOME=/xdg/cache \ No newline at end of file diff --git a/docker/xdg/config/neon/skills/skill-homescreen-lite.openvoiceos/settings.json b/docker/xdg/config/neon/skills/skill-homescreen-lite.openvoiceos/settings.json new file mode 100644 index 000000000..9244653e2 --- /dev/null +++ b/docker/xdg/config/neon/skills/skill-homescreen-lite.openvoiceos/settings.json @@ -0,0 +1,8 @@ +{ + "weather_skill": "skill-weather.neongeckocom", + "datetime_skill": "skill-date_time.neongeckocom", + "examples_skill": "skill-about.neongeckocom", + "wallpaper": "default.jpg", + "examples_enabled": true, + "__mycroft_skill_firstrun": false +} \ No newline at end of file diff --git a/docker/xdg/data/neon/resources/skill-demo.neongeckocom/locale/en-us/gui_demo.txt b/docker/xdg/data/neon/resources/skill-demo.neongeckocom/locale/en-us/gui_demo.txt new file mode 100644 index 000000000..8d8090e81 --- /dev/null +++ b/docker/xdg/data/neon/resources/skill-demo.neongeckocom/locale/en-us/gui_demo.txt @@ -0,0 +1,4 @@ +what time is it +what is microsoft trading at +how far away is mars +what is the forecast for seattle \ No newline at end of file diff --git a/docker/xdg/data/neon/resources/skill-demo.neongeckocom/locale/en-us/language_demo.txt b/docker/xdg/data/neon/resources/skill-demo.neongeckocom/locale/en-us/language_demo.txt new file mode 100644 index 000000000..73884e2c7 --- /dev/null +++ b/docker/xdg/data/neon/resources/skill-demo.neongeckocom/locale/en-us/language_demo.txt @@ -0,0 +1,25 @@ +who are you +change my response language to spanish +who are you +change my response language to french +who are you +change my response language to german +who are you +change my response language to italian +who are you +change my response language to polish +who are you +change my response language to ukrainian +who are you +change my response language to hungarian +who are you +change my response language to greek +who are you +change my response language to swedish +who are you +change my response language to dutch +who are you +change my response language to finnish +who are you +change my response language to irish +who are you \ No newline at end of file diff --git a/docker_overlay/etc/xdg/OpenVoiceOS/ovos.conf b/docker_overlay/etc/OpenVoiceOS/ovos.conf similarity index 75% rename from docker_overlay/etc/xdg/OpenVoiceOS/ovos.conf rename to docker_overlay/etc/OpenVoiceOS/ovos.conf index 584733eb8..f232ba517 100644 --- a/docker_overlay/etc/xdg/OpenVoiceOS/ovos.conf +++ b/docker_overlay/etc/OpenVoiceOS/ovos.conf @@ -1,13 +1,13 @@ { "module_overrides": { "neon_core": { - "xdg": true, "base_folder": "neon", "config_filename": "neon.yaml", "default_config_path": "/neon_core/neon_core/configuration/neon.yaml" } }, "submodule_mappings": { - "neon_core": "neon_core" + "neon_core": "neon_core", + "neon_core.skills.skill_manager": "neon_core" } } \ No newline at end of file diff --git a/docker_overlay/etc/xdg/neon/neon.yaml b/docker_overlay/etc/neon/neon.yaml similarity index 100% rename from docker_overlay/etc/xdg/neon/neon.yaml rename to docker_overlay/etc/neon/neon.yaml From 59c52dc273a862941a2b826d96507c8aaed2bd9e Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 6 Sep 2022 22:58:53 +0000 Subject: [PATCH 16/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 3ece933d0..d22fb54c7 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a6" +__version__ = "22.05.3a7" From 132b003d5edec500eb2d57e2f71a94397eb3bfd5 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Wed, 7 Sep 2022 10:45:47 -0700 Subject: [PATCH 17/44] Update demo and support helper skills (#285) Co-authored-by: Daniel McKnight --- requirements/skills_default.txt | 2 +- requirements/skills_essential.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/skills_default.txt b/requirements/skills_default.txt index c32c1c724..e140475bb 100644 --- a/requirements/skills_default.txt +++ b/requirements/skills_default.txt @@ -9,7 +9,7 @@ neon-skill-speak~=0.0.1 neon-skill-speed_test~=0.2 neon-skill-spelling~=0.0.1 neon-skill-stock~=0.0.1,>=0.0.2a0 -neon-skill-support_helper~=0.0.1 +neon-skill-support_helper~=0.0.1,>=0.0.2a0 # neon-skill-update neon-skill-user_settings~=0.0.1,>=0.0.2a1 neon-skill-weather~=0.0.1 diff --git a/requirements/skills_essential.txt b/requirements/skills_essential.txt index 4f8558e14..29ef37824 100644 --- a/requirements/skills_essential.txt +++ b/requirements/skills_essential.txt @@ -1,5 +1,5 @@ neon-skill-about~=0.0.1 neon-skill-date_time~=0.0.1 -neon-skill-demo~=0.0.1 +neon-skill-demo~=0.0.1,>=0.0.2a0 neon-skill-device_controls~=0.0.1 neon-skill-ip_address~=0.0.2 From 817d47bff09901316e56dd482dadb07af1a02dcb Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Wed, 7 Sep 2022 17:46:11 +0000 Subject: [PATCH 18/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index d22fb54c7..39fae29c6 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a7" +__version__ = "22.05.3a8" From 5fc0c78fc2029ca839cc4b1f3a2f69ced4c53723 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 12 Sep 2022 13:12:45 -0700 Subject: [PATCH 19/44] Update Alerts and CaffeineWiz skills (#287) Co-authored-by: Daniel McKnight --- requirements/skills_default.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/skills_default.txt b/requirements/skills_default.txt index e140475bb..ce646a007 100644 --- a/requirements/skills_default.txt +++ b/requirements/skills_default.txt @@ -1,7 +1,7 @@ ovos-skill-homescreen-lite @ git+https://github.com/openvoiceos/skill-homescreen-lite skill-ddg @ git+https://github.com/openvoiceos/skill-ddg -neon-skill-alerts~=1.0 -neon-skill-caffeinewiz~=0.2 +neon-skill-alerts~=1.0,>=1.0.1a0 +neon-skill-caffeinewiz~=0.2,>=0.2.1a0 neon-skill-data_controls~=0.1 neon-skill-fallback_wolfram_alpha~=0.0.1,>=0.0.2a0 neon-skill-personal~=0.0.1 From 64c0e259c5a6b4cc30201c5db9c5c372ee1e5b86 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 12 Sep 2022 20:13:09 +0000 Subject: [PATCH 20/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 39fae29c6..c5a159629 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a8" +__version__ = "22.05.3a9" From 6eededba1e0ec28e14ba2728650ae18e2d3b672f Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 12 Sep 2022 14:39:30 -0700 Subject: [PATCH 21/44] Pi/mk2 Compatibility (#269) * Update dependencies to troubleshoot Pi setup * Bump audio_record skill spec to resolve dependency resolution * Update dependencies from Pi testing * Add PHAL-based enclosure module with default plugins * Update default PHAL and WW dependencies * Remove ovos-core dependency from `core_modules` * Update Pi dependencies Add homescreen to pi dependencies and move lite homescreen to docker deps Update default WW config to use vosk plugin * Add setup skill to Pi requirements * Update minimum core module version specs Add brightness control PHAL module * Fix indent error in pi image tests * Fix (another) indent error in pi image tests * Troubleshoot setup test failures Update pi PHAL dependencies * Add deadsnakes ppa to workflow for python3.7 dependencies * Fix copy/paste error in python setup step * Update dependency versions Update alternative "hey neon" transcriptions * Remove pocketsphinx plugin dependency * Reorg dependencies to remove ruamel.yaml from Pi images * Update homescreen skill spec for Pi images * Update local speech dependencies * Update dependency version specs * Add GH Action to test Pi installation * Update dependency URL references * Fix cpu spec in chroot build test * Troubleshoot Pi setup tests * Add checkout step back to chroot test * Cleanup pi setup action Increase pi setup timeout to 30 minutes * Add missing g++ dependency for fann installation in pi setup tests * Update depdencies Troubleshoot coqui model init in chroot setup * Source venv in setup tests * Troubleshooting action failure * Update Pi setup tests to init default neon plugins * Update coqui plugin version to published spec * Add setup skill and handle waiting for wifi setup in skills service * Revert wifi setup tracking in skills service * Patch wifi setup completion GUI status * Add config overlay and deepspeech model download to pi setup tests * Add overlay directory to resolve test failures * Update ovos-utils version spec * Remove Pi skill added to docker overlay * Add mana to dev dependencies Add dashboard to pi dependencies * Increase static load time wait after internet so homescreen time is updated * Cleanup ovos config overlay * Update balena wifi plugin dependency spec * Update vosk WW plugin dependency spec * Update dependencies * Update dependency versions * Fix typo in dependency branch spec * Update Mk2 plugin spec * Update Pi dependencies * Update stt plugin dependency Update ovos-core dependency * Update alsa plugin dependency * Update neon_audio dependency spec * Update dependencies for Pi image compat * Update gui dependency version * Update gui module dependency spec * Update pi dependencies * Remove conflicting audio record skill * Update ovos-core dependency spec * Add on-device network plugin Troubleshoot Balena Wifi errors * Update remote STT plugin version * Update dependency spec * Update network manager dependency spec * Update Pi dependencies * Update neon_speech dependency * Update Pi PHAL plugin dependencies Co-authored-by: Daniel McKnight --- .github/workflows/setup_tests.yml | 18 ++ neon_core/skills/service.py | 16 +- requirements/core_modules.txt | 9 +- requirements/docker.txt | 9 +- requirements/local_speech_processing.txt | 11 +- requirements/pi.txt | 26 +++ requirements/remote_speech_processing.txt | 7 +- requirements/requirements.txt | 6 +- requirements/skills_default.txt | 1 - requirements/skills_extended.txt | 2 +- .../etc/OpenVoiceOS/ovos.conf | 16 ++ test/pi_image_overlay/etc/neon/neon.yaml | 181 ++++++++++++++++++ .../root/.local/share/neon/.keep | 0 test/pi_setup.sh | 54 ++++++ 14 files changed, 339 insertions(+), 17 deletions(-) create mode 100644 test/pi_image_overlay/etc/OpenVoiceOS/ovos.conf create mode 100644 test/pi_image_overlay/etc/neon/neon.yaml create mode 100644 test/pi_image_overlay/root/.local/share/neon/.keep create mode 100644 test/pi_setup.sh diff --git a/.github/workflows/setup_tests.yml b/.github/workflows/setup_tests.yml index 322d9ddc8..a7d856482 100644 --- a/.github/workflows/setup_tests.yml +++ b/.github/workflows/setup_tests.yml @@ -29,6 +29,24 @@ jobs: - name: Test Skills Installation run: | pip install .[skills_required,skills_essential,skills_default,skills_extended] + pi_image: + runs-on: ubuntu-latest + timeout-minutes: 45 + steps: + - uses: actions/checkout@v2 + - name: Test chroot installation + uses: pguyot/arm-runner-action@v2 + with: + optimize_image: false + base_image: https://2222.us/app/files/neon_images/pi/ubuntu_22_04.img.xz + cpu: cortex-a53 + copy_repository_path: /core + commands: | + bash /core/test/pi_setup.sh + . /core/venv/bin/activate + neon-audio init-plugin -p coqui + neon-speech init-plugin -p deepspeech_stream_local + legacy-remote: strategy: matrix: diff --git a/neon_core/skills/service.py b/neon_core/skills/service.py index 061c620c7..7942dfd15 100644 --- a/neon_core/skills/service.py +++ b/neon_core/skills/service.py @@ -34,9 +34,11 @@ from typing import Optional from threading import Thread +from mycroft_bus_client import Message from ovos_config.locale import set_default_lang, set_default_tz from ovos_config.config import Configuration from ovos_utils.log import LOG +from ovos_utils.process_utils import ProcessState from ovos_utils.skills.locations import get_plugin_skills, get_skill_directories from neon_utils.metrics_utils import announce_connection from neon_utils.signal_utils import init_signal_handlers, init_signal_bus @@ -130,7 +132,7 @@ def _get_skill_dirs(self) -> list: """ plugin_dirs, _ = get_plugin_skills() skill_base_dirs = get_skill_directories(self.config) - + # TODO: Get ovos_plugin_common_play too skill_dirs = [join(base_dir, d) for base_dir in skill_base_dirs for d in listdir(base_dir)] return plugin_dirs + skill_dirs @@ -177,6 +179,7 @@ def run(self): while not self.skill_manager.is_all_loaded(): time.sleep(0.1) self.status.set_ready() + self.register_wifi_setup_events() announce_connection() def _initialize_metrics_handler(self): @@ -204,6 +207,17 @@ def _register_intent_services(self): ) return service + def handle_wifi_setup_completed(self, _): + # Skills have been loaded, allow some time for time sync service + time.sleep(10) + self.bus.emit(Message("system.display.homescreen")) + + def register_wifi_setup_events(self): + self.bus.once("ovos.wifi.setup.completed", + self.handle_wifi_setup_completed) + self.bus.once("ovos.phal.wifi.plugin.skip.setup", + self.handle_wifi_setup_completed) + def shutdown(self): LOG.info('Shutting down Skills service') if self.status: diff --git a/requirements/core_modules.txt b/requirements/core_modules.txt index 4a958801c..25d15cd2d 100644 --- a/requirements/core_modules.txt +++ b/requirements/core_modules.txt @@ -1,9 +1,6 @@ -ovos-core[all]~=0.0.4 -ovos-ww-plugin-pocketsphinx~=0.1.2 - # neon core modules neon_messagebus~=0.2 -neon_gui~=1.0 +neon_gui~=1.0,>=1.0.1a1 neon_enclosure~=1.0 -neon_speech~=2.0,>=2.0.1a1 -neon_audio~=1.1 +neon_speech~=2.0,>=2.0.1a7 +neon_audio~=1.1,>=1.1.1a0 diff --git a/requirements/docker.txt b/requirements/docker.txt index 625b24f6e..7b73ce665 100644 --- a/requirements/docker.txt +++ b/requirements/docker.txt @@ -1,2 +1,9 @@ # TTS Plugin configured for Demo Skill -ovos-tts-plugin-mimic \ No newline at end of file +ovos-tts-plugin-mimic + +# "Lite" homescreen disables edge-device functionality +ovos-skill-homescreen-lite @ git+https://github.com/openvoiceos/skill-homescreen-lite + +# Support legacy configuration file loading +neon-utils[configuration]~=1.0,>=1.0.2 + diff --git a/requirements/local_speech_processing.txt b/requirements/local_speech_processing.txt index 5194bb20c..eef615455 100644 --- a/requirements/local_speech_processing.txt +++ b/requirements/local_speech_processing.txt @@ -1,2 +1,9 @@ -neon-stt-plugin-deepspeech-stream-local~=1.1 -neon-tts-plugin-mimic~=0.1,>=0.1.8 \ No newline at end of file +neon-stt-plugin-deepspeech-stream-local==1.1.1a0 +neon-tts-plugin-coqui~=0.5,>=0.5.1a0 +# TODO: Local language plugin + +# Fallback TTS +ovos-tts-plugin-mimic + +# Backwards-compat. for tests +neon-tts-plugin-mimic diff --git a/requirements/pi.txt b/requirements/pi.txt index 81a304763..63ffcc113 100644 --- a/requirements/pi.txt +++ b/requirements/pi.txt @@ -1,2 +1,28 @@ +# ARM-specific releases deepspeech @ https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-cp37-cp37m-linux_aarch64.whl vosk @ https://github.com/alphacep/vosk-api/releases/download/v0.3.30/vosk-0.3.30-py3-none-linux_aarch64.whl + +# Default debug client +neon-cli-client~=0.2 + +# Default plugins +ovos-ww-plugin-vosk~=0.0,>=0.0.4 + +# PHAL Plugins +ovos-phal-plugin-brightness-control-rpi>=1.0.0a3 +ovos-phal-plugin-notification-widgets>=1.0.0a2 +ovos-phal-plugin-color-scheme-manager>=1.0.0a2 +ovos-phal-plugin-configuration-provider>=1.0.0a2 +ovos-phal-plugin-balena-wifi>=1.0.0a4 +ovos-phal-plugin-gui-network-client>=0.0.2a2 +ovos-phal-plugin-network-manager>=1.0.0a3 +ovos-phal-plugin-wifi-setup>=1.0.0a4 +ovos-phal-plugin-dashboard>=0.0.1 +ovos-phal-plugin-mk2>=0.0.1a2 +ovos-phal-plugin-alsa>=0.0.1a2 +ovos-phal-plugin-system>=0.0.2a4 +ovos-skill-setup @ git+https://github.com/OpenVoiceOS/skill-ovos-setup + +# Pi-specific skills +# TODO Homescreen advertises itself as mycroft-homescreen when pip installed, so we're not pip installing it +# ovos-skill-homescreen @ git+https://github.com/OpenVoiceOS/skill-ovos-homescreen diff --git a/requirements/remote_speech_processing.txt b/requirements/remote_speech_processing.txt index 8e5122e78..ea555b062 100644 --- a/requirements/remote_speech_processing.txt +++ b/requirements/remote_speech_processing.txt @@ -1,3 +1,6 @@ -neon-stt-plugin-google-cloud-streaming~=0.2,>=0.2.8 +neon-stt-plugin-google-cloud-streaming~=0.2,>=0.2.9a0 neon-tts-plugin-polly~=0.2 -neon-lang-plugin-amazon_translate~=0.1 \ No newline at end of file +neon-lang-plugin-amazon_translate~=0.1 + +# Fallback TTS +ovos-tts-plugin-mimic \ No newline at end of file diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 4196b3339..6896da2ef 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,9 +1,9 @@ # mycroft -ovos-core[skills_lgpl]~=0.0.4 +ovos-core[skills_lgpl]~=0.0.4,>=0.0.5a5 # utils neon-utils[network,configuration]~=1.0,>=1.0.3a3 -neon-transformers~=0.1 -ovos_utils~=0.0,>=0.0.23 +neon-transformers~=0.2 +ovos_utils~=0.0,>=0.0.24a2 ovos-config~=0.0,>=0.0.4 ovos-skills-manager~=0.0,>=0.0.11 ovos-plugin-manager~=0.0.16,>=0.0.19a1 diff --git a/requirements/skills_default.txt b/requirements/skills_default.txt index ce646a007..6066ae023 100644 --- a/requirements/skills_default.txt +++ b/requirements/skills_default.txt @@ -1,4 +1,3 @@ -ovos-skill-homescreen-lite @ git+https://github.com/openvoiceos/skill-homescreen-lite skill-ddg @ git+https://github.com/openvoiceos/skill-ddg neon-skill-alerts~=1.0,>=1.0.1a0 neon-skill-caffeinewiz~=0.2,>=0.2.1a0 diff --git a/requirements/skills_extended.txt b/requirements/skills_extended.txt index 6e119e3db..55f25f8e4 100644 --- a/requirements/skills_extended.txt +++ b/requirements/skills_extended.txt @@ -1,4 +1,4 @@ -neon-skill-audio_record +# neon-skill-audio_record>=0.0.2a0 neon-skill-custom_conversation neon-skill-instructions neon-skill-launcher diff --git a/test/pi_image_overlay/etc/OpenVoiceOS/ovos.conf b/test/pi_image_overlay/etc/OpenVoiceOS/ovos.conf new file mode 100644 index 000000000..4ea53a4d9 --- /dev/null +++ b/test/pi_image_overlay/etc/OpenVoiceOS/ovos.conf @@ -0,0 +1,16 @@ +{ + "module_overrides": { + "neon_core": { + "base_folder": "neon", + "config_filename": "neon.yaml" + } + }, + "submodule_mappings": { + "neon_audio": "neon_core", + "neon_gui": "neon_core", + "neon_messagebus": "neon_core", + "neon_speech": "neon_core", + "neon_enclosure": "neon_core", + "neon_cli": "neon_core" + } +} \ No newline at end of file diff --git a/test/pi_image_overlay/etc/neon/neon.yaml b/test/pi_image_overlay/etc/neon/neon.yaml new file mode 100644 index 000000000..4e02b5ce1 --- /dev/null +++ b/test/pi_image_overlay/etc/neon/neon.yaml @@ -0,0 +1,181 @@ +play_wav_cmdline: "play %1" +play_mp3_cmdline: "play %1" +play_ogg_cmdline: "play %1" +tts: + module: coqui + fallback_module: ovos-tts-plugin-mimic +Audio: + backends: + OCP: + type: ovos_common_play + active: true + dbus_type: system + simple: + type: ovos_audio_simple + active: true + vlc: + type: ovos_vlc + active: false + default-backend: OCP +audio_parsers: + blacklist: + - gender +stt: + module: deepspeech_stream_local + fallback_module: ovos-stt-plugin-vosk + vosk: + model: /home/neon/.config/neon/vosk-model-small-en-us-0.15 + deepspeech_stream_local: + model_file: /root/.local/share/neon/deepspeech-0.9.3-models.tflite + scorer_file: /root/.local/share/neon/deepspeech-0.9.3-models.scorer + ovos-stt-plugin-server: + url: https://stt.openvoiceos.com/stt +confirm_listening: true +listener: + sample_rate: 16000 + mic_meter_ipc: false + record_wake_words: false + save_utterances: false + wake_word_upload: + disable: false + url: https://training.mycroft.ai/precise/upload + wake_word_enabled: true # TODO: Deprecate and replace with `continuous_listen` + continuous_listen: false + VAD: + silence_method: vad_and_ratio + speech_seconds: 0.1 + silence_seconds: 0.5 + before_seconds: 0.5 + min_seconds: 1 + max_current_ratio_threshold: 2 + initial_energy_threshold: 1000.0 + module: '' + ovos-vad-plugin-silero: + threshold: 0.2 + ovos-vad-plugin-webrtcvad: + vad_mode: 3 + mute_during_output: true + duck_while_listening: 0.3 + phoneme_duration: 120 + multiplier: 1.0 + energy_ratio: 1.5 + recording_timeout: 10.0 + recording_timeout_with_silence: 3.0 + instant_listen: false +hotwords: + hey mycroft: + active: false + wake up: + active: false + hey neon: + module: ovos-ww-plugin-vosk + listen: true + debug: false + model_folder: /home/neon/.local/share/neon/vosk-model-small-en-us-0.15 + samples: + - hey neon + - hey neil + - hey near + - hey now + - hey india + - hey me or + - hey moron + - kenya + - the neon + - a neon + - the indian + - india +sounds: + start_listening: snd/start_listening.wav + end_listening: snd/end_listening.wav + acknowledge: snd/acknowledge.mp3 +gui_websocket: + host: 0.0.0.0 + base_port: 18181 + route: /gui + ssl: false +websocket: + host: 0.0.0.0 + port: 8181 + route: /core + ssl: false + allow_self_signed: false + ssl_cert: + ssl_key: + shared_connection: true +gui: + idle_display_skill: skill-ovos-homescreen.openvoiceos + extension: smartspeaker + run_gui_file_server: false + generic: + homescreen_supported: true +MQ: + server: mq.2021.us + port: 25672 + users: + mq_handler: + user: neon_api_utils + password: Klatchat2021 +signal: + max_wait_seconds: 300 +skills: + run_gui_file_server: false + wait_for_internet: false + extra_directories: + - /home/neon/.local/share/neon/skills + upload_skill_manifest: false + blacklisted_skills: [] + priority_skills: [] + fallbacks: + fallback_priorities: {} + fallback_mode: accept_all + fallback_whitelist: [] + fallback_blacklist: [] + converse: + timeout: 300 + skill_timeouts: {} + converse_mode: accept_all + converse_whitelist: [] + converse_blacklist: [] + converse_activation: accept_all + max_activations: -1 + skill_activations: {} + cross_activation: true + cross_deactivation: true + converse_priorities: {} + update_interval: 1.0 + disable_osm: false + appstore_sync_interval: 6 + auto_update: false + auto_update_interval: 24 + neon_token: '' + install_essential: true + essential_skills: [] + install_default: false + default_skills: + # TODO: Defaults are just patching skills not yet pip installable + - https://github.com/JarbasSkills/skill-icanhazdadjokes/tree/dev + - https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/main +PHAL: + ovos-PHAL-plugin-balena-wifi: + debug: false + ssid: Neon + psk: + color: '#ff8600' + portal: start dot neon dot ai + device: Neon Device +ready_settings: + - skills + - speech + - audio + - gui +system: + protected_keys: + remote: + - gui_websocket:host + - websocket:host + user: + - gui_websocket:host + - websocket:host +log_dir: /home/neon/logs/ +debug: True \ No newline at end of file diff --git a/test/pi_image_overlay/root/.local/share/neon/.keep b/test/pi_image_overlay/root/.local/share/neon/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/pi_setup.sh b/test/pi_setup.sh new file mode 100644 index 000000000..022bdad73 --- /dev/null +++ b/test/pi_setup.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework +# All trademark and other rights reserved by their respective owners +# Copyright 2008-2022 Neongecko.com Inc. +# Contributors: Daniel McKnight, Guy Daniels, Elon Gasper, Richard Leeds, +# Regina Bloomstine, Casimiro Ferreira, Andrii Pernatii, Kirill Hrymailo +# BSD-3 License +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from this +# software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Override DNS resolver +rm /etc/resolv.conf +echo "nameserver 1.1.1.1" | tee /etc/resolv.conf + +# install system packages +apt update +add-apt-repository -y ppa:deadsnakes/ppa +apt install -y curl +curl https://forslund.github.io/mycroft-desktop-repo/mycroft-desktop.gpg.key | apt-key add - 2> /dev/null && \ +echo "deb http://forslund.github.io/mycroft-desktop-repo bionic main" | tee /etc/apt/sources.list.d/mycroft-desktop.list +apt update +apt install -y sox gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev python3.7-dev python3.7-venv mimic espeak-ng g++ || exit 1 + +# Configure venv for deepspeech compat. +cd /core || exit 10 +python3.7 -m venv "/core/venv" || exit 11 +. /core/venv/bin/activate + +pip install --upgrade pip wheel +pip install ".[core_modules,skills_required,skills_essential,skills_default,skills_extended,pi,local]" || exit 11 + +cp -rf /core/test/pi_image_overlay/* / +# TODO: Remove patched STT config +wget -O /root/.local/share/neon/deepspeech-0.9.3-models.scorer https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer +wget -O /root/.local/share/neon/deepspeech-0.9.3-models.tflite https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.tflite \ No newline at end of file From bf6ac391365d86f2c6cff0178120291476ae4eb5 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 12 Sep 2022 21:39:52 +0000 Subject: [PATCH 22/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index c5a159629..d8318e6c7 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a9" +__version__ = "22.05.3a10" From 18351e915a1eaafef836c02dced48b2cc3a94b59 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Tue, 13 Sep 2022 15:22:48 -0700 Subject: [PATCH 23/44] Fix neon_utils dependency conflict (#288) Co-authored-by: Daniel McKnight --- requirements/docker.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/requirements/docker.txt b/requirements/docker.txt index 7b73ce665..d00ad5b2b 100644 --- a/requirements/docker.txt +++ b/requirements/docker.txt @@ -3,7 +3,3 @@ ovos-tts-plugin-mimic # "Lite" homescreen disables edge-device functionality ovos-skill-homescreen-lite @ git+https://github.com/openvoiceos/skill-homescreen-lite - -# Support legacy configuration file loading -neon-utils[configuration]~=1.0,>=1.0.2 - From 0db5a316d4c8ee78d40bbab595ba2c4c87b23748 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 13 Sep 2022 22:23:11 +0000 Subject: [PATCH 24/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index d8318e6c7..07d0b556e 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a10" +__version__ = "22.05.3a11" From 4ab9084b1bd7f5d91ac3768f19936699268569ff Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Thu, 15 Sep 2022 14:22:31 -0700 Subject: [PATCH 25/44] Update OCP Skills, Personal, Data Controls (#289) * Update personal, data_controls skill specs Replace avmusic skill with free_music_archive * Replace neon news skill with Jarbas skill Co-authored-by: Daniel McKnight --- requirements/skills_default.txt | 5 +++-- requirements/skills_extended.txt | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/requirements/skills_default.txt b/requirements/skills_default.txt index 6066ae023..b33516930 100644 --- a/requirements/skills_default.txt +++ b/requirements/skills_default.txt @@ -1,9 +1,9 @@ skill-ddg @ git+https://github.com/openvoiceos/skill-ddg neon-skill-alerts~=1.0,>=1.0.1a0 neon-skill-caffeinewiz~=0.2,>=0.2.1a0 -neon-skill-data_controls~=0.1 +neon-skill-data_controls~=0.1,>=0.1.1a0 neon-skill-fallback_wolfram_alpha~=0.0.1,>=0.0.2a0 -neon-skill-personal~=0.0.1 +neon-skill-personal~=0.0.1,>=0.0.2a0 neon-skill-speak~=0.0.1 neon-skill-speed_test~=0.2 neon-skill-spelling~=0.0.1 @@ -13,3 +13,4 @@ neon-skill-support_helper~=0.0.1,>=0.0.2a0 neon-skill-user_settings~=0.0.1,>=0.0.2a1 neon-skill-weather~=0.0.1 neon-skill-wikipedia~=0.3 +neon-skill-free_music_archive>=0.0.1a0 diff --git a/requirements/skills_extended.txt b/requirements/skills_extended.txt index 55f25f8e4..3f747f032 100644 --- a/requirements/skills_extended.txt +++ b/requirements/skills_extended.txt @@ -1,11 +1,12 @@ -# neon-skill-audio_record>=0.0.2a0 +neon-skill-audio_record>=0.0.2a0 neon-skill-custom_conversation neon-skill-instructions neon-skill-launcher neon-skill-messaging -neon-skill-news +# neon-skill-news +ovos-skill-news @ git+https://github.com/neondaniel/skill-news@REF_RequirementsHandling # neon-skill-recipes neon-skill-synonyms neon-skill-translation -neon-skill-avmusic +# neon-skill-avmusic neon-skill-camera From ec47181fa96aef171b1ec6f18e65b22d5e498c1e Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Thu, 15 Sep 2022 14:22:51 -0700 Subject: [PATCH 26/44] Add notification widget plugin to pi dependencies (#290) * Add notification widget plugin to pi dependencies * Add idna license override Co-authored-by: Daniel McKnight --- requirements/pi.txt | 1 + test/license_tests.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements/pi.txt b/requirements/pi.txt index 63ffcc113..1de83e0ce 100644 --- a/requirements/pi.txt +++ b/requirements/pi.txt @@ -21,6 +21,7 @@ ovos-phal-plugin-dashboard>=0.0.1 ovos-phal-plugin-mk2>=0.0.1a2 ovos-phal-plugin-alsa>=0.0.1a2 ovos-phal-plugin-system>=0.0.2a4 +ovos-phal-plugin-notification-widgets>=1.0.0a2 ovos-skill-setup @ git+https://github.com/OpenVoiceOS/skill-ovos-setup # Pi-specific skills diff --git a/test/license_tests.py b/test/license_tests.py index 34e80ae9b..651123caa 100644 --- a/test/license_tests.py +++ b/test/license_tests.py @@ -20,7 +20,8 @@ "ovos-skill-installer": "MIT", "python-dateutil": "Apache-2.0", "pyparsing": "MIT", - "exceptiongroup": "MIT" + "exceptiongroup": "MIT", + "idna": "BSD3" } # explicitly allow these packages that would fail otherwise whitelist = ["neon-core", From 61de80cb393a8f341fabcf11500d6430b756c301 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Thu, 15 Sep 2022 21:23:14 +0000 Subject: [PATCH 27/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 07d0b556e..46bdf7fd3 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a11" +__version__ = "22.05.3a12" From bfff3d59c37e3bbcf14f83ed6c514fcb40893ac3 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Thu, 15 Sep 2022 17:28:32 -0700 Subject: [PATCH 28/44] Update Translation and User Settings Skills (#291) * Update translation skill dependency spec * Update user settings skill dependency spec Co-authored-by: Daniel McKnight --- requirements/skills_default.txt | 2 +- requirements/skills_extended.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/skills_default.txt b/requirements/skills_default.txt index b33516930..1c2353eac 100644 --- a/requirements/skills_default.txt +++ b/requirements/skills_default.txt @@ -10,7 +10,7 @@ neon-skill-spelling~=0.0.1 neon-skill-stock~=0.0.1,>=0.0.2a0 neon-skill-support_helper~=0.0.1,>=0.0.2a0 # neon-skill-update -neon-skill-user_settings~=0.0.1,>=0.0.2a1 +neon-skill-user_settings~=0.0.1,>=0.0.2a2 neon-skill-weather~=0.0.1 neon-skill-wikipedia~=0.3 neon-skill-free_music_archive>=0.0.1a0 diff --git a/requirements/skills_extended.txt b/requirements/skills_extended.txt index 3f747f032..8dd82b3b0 100644 --- a/requirements/skills_extended.txt +++ b/requirements/skills_extended.txt @@ -7,6 +7,6 @@ neon-skill-messaging ovos-skill-news @ git+https://github.com/neondaniel/skill-news@REF_RequirementsHandling # neon-skill-recipes neon-skill-synonyms -neon-skill-translation +neon-skill-translation>=0.1.1a0 # neon-skill-avmusic neon-skill-camera From ec451a73db1a1190edca99a34c51f8ddb2b1c11e Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Fri, 16 Sep 2022 00:28:55 +0000 Subject: [PATCH 29/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 46bdf7fd3..745e45197 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a12" +__version__ = "22.05.3a13" From 8e6dc726458e4edfaf748152b5f6533cd7579998 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 26 Sep 2022 15:48:01 -0700 Subject: [PATCH 30/44] Refactor skill installation to detect and handle pip skill specs (#286) * Refactor skill installation to detect and handle pip skill specs Update unit tests to cover pip skills * Update install tests to handle installed skill not yet added to Python env * Try os.system to detect installed package * Update docker to install default skills at container start instead of create * Fix typo in run.sh Add default skill to example neon.yaml so user changes don't override existing defaults * Update logic to handle mixed git and pip installable skills Update docstrings * Annotate reason for joke skill in docker config Co-authored-by: Daniel McKnight --- Dockerfile | 3 +- docker/config/neon.yaml | 4 ++ docker_overlay/root/run.sh | 3 +- neon_core/configuration/neon.yaml | 1 + neon_core/util/skill_utils.py | 88 +++++++++++++++++++++---------- test/test_skill_utils.py | 18 +++++++ 6 files changed, 86 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5e592029c..5733a7bee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,5 +52,4 @@ CMD ["/root/run.sh"] FROM base as default_skills RUN pip install .[skills_required,skills_essential,skills_default,skills_extended] -# TODO: Default skill installation is a temporary step until all skills are pip installable -RUN neon-install-default-skills +# Default skills from configuration are installed at container creation diff --git a/docker/config/neon.yaml b/docker/config/neon.yaml index b610554fc..9a0af4f25 100644 --- a/docker/config/neon.yaml +++ b/docker/config/neon.yaml @@ -9,6 +9,10 @@ ready_settings: - speech - audio - gui +skills: + default_skills: + # Jokes skill included because it cannot be pip installed to the image + - https://github.com/JarbasSkills/skill-icanhazdadjokes/tree/dev MQ: server: mq.2021.us port: 25672 \ No newline at end of file diff --git a/docker_overlay/root/run.sh b/docker_overlay/root/run.sh index ae5b8ffc9..f6630dd61 100644 --- a/docker_overlay/root/run.sh +++ b/docker_overlay/root/run.sh @@ -27,6 +27,7 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Plugin installation must occur in a separate thread, before module load, for the entry point to be loaded. +# Python package installation must occur in a separate thread, before module load, for the entry point to be loaded. +neon install-default-skills neon install-skill-requirements /skills neon run-skills \ No newline at end of file diff --git a/neon_core/configuration/neon.yaml b/neon_core/configuration/neon.yaml index 875938c6b..6e4f47e6d 100644 --- a/neon_core/configuration/neon.yaml +++ b/neon_core/configuration/neon.yaml @@ -83,6 +83,7 @@ listener: continuous_listen: false VAD: silence_method: vad_and_ratio + # vad_only, radio_only, current_only, vad_and_ratio, vad_and_current, all speech_seconds: 0.1 silence_seconds: 0.5 before_seconds: 0.5 diff --git a/neon_core/util/skill_utils.py b/neon_core/util/skill_utils.py index c12e6a3b0..6c40f295b 100644 --- a/neon_core/util/skill_utils.py +++ b/neon_core/util/skill_utils.py @@ -101,6 +101,57 @@ def _write_pip_constraints_to_file(output_file: str = None): LOG.info(f"Wrote core constraints to file: {output_file}") +def _install_skill_osm(skill_url: str, skill_dir: str, skills_catalog: dict): + """ + Install a skill from source using OVOS Skills Manager + :param skill_url: URL of skill to install + :param skill_dir: Directory to install skill to + :param skills_catalog: dict Neon skill information (url to dict data) + """ + osm = OVOSSkillsManager() + try: + normalized_url = normalize_github_url(skill_url) + # Check if this skill is in the Neon list + if normalized_url in skills_catalog: + branch = get_branch_from_github_url(skill_url) + # Set URL and branch to requested spec + skills_catalog[normalized_url]["url"] = normalized_url + skills_catalog[normalized_url]["branch"] = branch + entry = SkillEntry.from_json(skills_catalog.get(normalized_url), False) + else: + LOG.warning(f"Requested Skill not in Neon skill store ({skill_url})") + entry = osm.skill_entry_from_url(skill_url) + LOG.debug(entry.json) + + osm.install_skill(entry, skill_dir) + if not os.path.isdir(os.path.join(skill_dir, entry.uuid)): + LOG.error(f"Failed to install: " + f"{os.path.join(skill_dir, entry.uuid)}") + if entry.download(skill_dir): + LOG.info(f"Downloaded failed skill: {entry.uuid}") + else: + LOG.error(f"Failed to download: {entry.uuid}") + else: + LOG.info(f"Installed {skill_url} to {skill_dir}") + except Exception as e: + LOG.error(e) + + +def _install_skill_pip(skill_package: str, constraints_file: str) -> bool: + """ + Pip install the specified package + :param skill_package: package to install (git url or pypi name) + :param constraints_file: system Python package constraints + :returns: True if installation was successful, else False + """ + import pip + LOG.info(f"Requested installation of plugin skill: {skill_package}") + returned = pip.main(['install', skill_package, "-c", + constraints_file]) + LOG.info(f"pip status: {returned}") + return returned == 0 + + def set_osm_constraints_file(constraints_file: str): """ Sets the DEFAULT_CONSTRAINTS param for OVOS Skills Manager. @@ -114,8 +165,8 @@ def set_osm_constraints_file(constraints_file: str): def install_skills_from_list(skills_to_install: list, config: dict = None): """ - Installs the passed list of skill URLs - :param skills_to_install: list of skill URLs to install + Installs the passed list of skill URLs and/or PyPI package names + :param skills_to_install: list of skills to install :param config: optional dict configuration """ config = config or Configuration()["skills"] @@ -127,7 +178,6 @@ def install_skills_from_list(skills_to_install: list, config: dict = None): and config["directory"] != "skills" else join(xdg_data_home(), "neon", "skills")) LOG.info(f"skill_dir={skill_dir}") - osm = OVOSSkillsManager() skills_catalog = get_neon_skills_data() token_set = False if config.get("neon_token"): @@ -136,37 +186,19 @@ def install_skills_from_list(skills_to_install: list, config: dict = None): LOG.info(f"Added token to request headers: {config.get('neon_token')}") try: _write_pip_constraints_to_file() + constraints_file = '/etc/mycroft/constraints.txt' except PermissionError: constraints_file = join(xdg_data_home(), "neon", "constraints.txt") _write_pip_constraints_to_file(constraints_file) set_osm_constraints_file(constraints_file) for url in skills_to_install: - try: - normalized_url = normalize_github_url(url) - # Check if this skill is in the Neon list - if normalized_url in skills_catalog: - branch = get_branch_from_github_url(url) - # Set URL and branch to requested spec - skills_catalog[normalized_url]["url"] = normalized_url - skills_catalog[normalized_url]["branch"] = branch - entry = SkillEntry.from_json(skills_catalog.get(normalized_url), False) - else: - LOG.warning(f"Requested Skill not in Neon skill store ({url})") - entry = osm.skill_entry_from_url(url) - LOG.debug(entry.json) + if "://" in url and "git+" not in url: + _install_skill_osm(url, skill_dir, skills_catalog) + else: + if not _install_skill_pip(url, constraints_file): + LOG.warning(f"Pip installation failed for: {url}") + _install_skill_osm(url, skill_dir, skills_catalog) - osm.install_skill(entry, skill_dir) - if not os.path.isdir(os.path.join(skill_dir, entry.uuid)): - LOG.error(f"Failed to install: " - f"{os.path.join(skill_dir, entry.uuid)}") - if entry.download(skill_dir): - LOG.info(f"Downloaded failed skill: {entry.uuid}") - else: - LOG.error(f"Failed to download: {entry.uuid}") - else: - LOG.info(f"Installed {url} to {skill_dir}") - except Exception as e: - LOG.error(e) if token_set: clear_github_token() LOG.info(f"Installed skills to: {skill_dir}") diff --git a/test/test_skill_utils.py b/test/test_skill_utils.py index 2b7462834..5c40bf653 100644 --- a/test/test_skill_utils.py +++ b/test/test_skill_utils.py @@ -43,6 +43,13 @@ "https://github.com/NeonGeckoCom/caffeinewiz.neon/tree/dev", "https://github.com/NeonGeckoCom/launcher.neon/tree/dev" ] + +TEST_SKILLS_WITH_PIP = [ + "https://github.com/NeonGeckoCom/skill-date_time/tree/dev", + "git+https://github.com/NeonGeckoCom/malls-parser-skill", + "neon-skill-support_helper" +] + TEST_SKILLS_WITH_AUTH = [ "https://github.com/NeonGeckoCom/i-like-brands.neon/tree/dev", "https://github.com/NeonGeckoCom/i-like-coupons.neon/tree/dev" @@ -106,6 +113,17 @@ def test_install_skills_default(self): f"{skill_dirs}\n\n" f"{get_remote_entries(SKILL_CONFIG['default_skills'])}") + def test_install_skills_with_pip(self): + from neon_core.util.skill_utils import install_skills_from_list + install_skills_from_list(TEST_SKILLS_WITH_PIP, SKILL_CONFIG) + skill_dirs = [d for d in os.listdir(SKILL_DIR) + if os.path.isdir(os.path.join(SKILL_DIR, d))] + self.assertEqual(len(skill_dirs), 1) + self.assertIn("skill-date_time.neongeckocom", skill_dirs) + + returned = os.system("pip show neon-skill-support-helper") + self.assertEqual(returned, 0) + def test_get_neon_skills_data(self): from neon_core.util.skill_utils import get_neon_skills_data from ovos_skills_manager.github.utils import normalize_github_url From 8e524269c67cef47d86a4b3344fc6cd251287abf Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 26 Sep 2022 22:48:22 +0000 Subject: [PATCH 31/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 745e45197..56dc693e2 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a13" +__version__ = "22.05.3a14" From d0c3fe9be648b8da032e9f73a47886d84bfc9a0f Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 10 Oct 2022 17:41:39 -0700 Subject: [PATCH 32/44] Update libretranslate plugin version (#294) Co-authored-by: Daniel McKnight --- requirements/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 6896da2ef..ea6e052eb 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -11,7 +11,7 @@ ovos-plugin-manager~=0.0.16,>=0.0.19a1 psutil~=5.6 # default plugins -neon-lang-plugin-libretranslate~=0.1,>=0.1.2 +neon-lang-plugin-libretranslate~=0.1,>=0.1.3a1 neon-utterance-translator-plugin~=0.1 neon-utterance-normalizer-plugin~=0.0.0,>=0.0.1a0 # text parser modules From 87044b750df8e8054020250f788971557de0a3b4 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 11 Oct 2022 00:42:03 +0000 Subject: [PATCH 33/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 56dc693e2..834512b6c 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a14" +__version__ = "22.05.3a15" From a859921644c81730b6bb61fde59e12ffc6ecad09 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Wed, 12 Oct 2022 19:13:58 -0700 Subject: [PATCH 34/44] Feat mark2 setup (#293) * Update ovos-core dependency to include hotwords fix Update news skill reference * Troubleshoot spinner on setup completion * Troubleshoot skills service not starting in debos images * Update dependency versions Add default PHAL config * Update dependency versions * pip install homescreen skill * Add libjpg apt dependency for pillow installation * Update news skill spec * Add google STT plugin to Pi dependencies for default image compat. * Update plugin version specs * Update setup skill ref * Update enclosure dependency spec Co-authored-by: Daniel McKnight --- neon_core/configuration/neon.yaml | 3 +++ neon_core/skills/__main__.py | 8 ++++++-- neon_core/skills/service.py | 17 +++++++++++++---- requirements/core_modules.txt | 2 +- requirements/local_speech_processing.txt | 4 ++-- requirements/pi.txt | 20 ++++++++++---------- requirements/requirements.txt | 2 +- requirements/skills_extended.txt | 2 +- test/pi_setup.sh | 2 +- 9 files changed, 38 insertions(+), 22 deletions(-) diff --git a/neon_core/configuration/neon.yaml b/neon_core/configuration/neon.yaml index 6e4f47e6d..59eddfac2 100644 --- a/neon_core/configuration/neon.yaml +++ b/neon_core/configuration/neon.yaml @@ -204,6 +204,9 @@ MQ: signal: use_signal_files: true max_wait_seconds: 300 +PHAL: + wait_for_gui: False + # Debug/Metrics opt_in: false debug: false diff --git a/neon_core/skills/__main__.py b/neon_core/skills/__main__.py index 43d146dfb..88d936ef6 100644 --- a/neon_core/skills/__main__.py +++ b/neon_core/skills/__main__.py @@ -27,6 +27,7 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from neon_core.skills.service import NeonSkillService +from neon_utils.logger import LOG from mycroft.lock import Lock from mycroft.util import reset_sigint_handler, wait_for_exit_signal @@ -37,8 +38,11 @@ def main(*args, **kwargs): # Create PID file, prevent multiple instances of this service Lock('skills') service = NeonSkillService(*args, **kwargs) - service.start() - wait_for_exit_signal() + try: + service.start() + wait_for_exit_signal() + except Exception as e: + LOG.exception(e) service.shutdown() diff --git a/neon_core/skills/service.py b/neon_core/skills/service.py index 7942dfd15..d5dd1d147 100644 --- a/neon_core/skills/service.py +++ b/neon_core/skills/service.py @@ -85,6 +85,7 @@ def __init__(self, watchdog: Optional[callable] = None, config: Optional[dict] = None, daemonic: bool = False): Thread.__init__(self) + LOG.debug("Starting Skills Service") self.setDaemon(daemonic) self.bus = None self.skill_manager = None @@ -138,6 +139,7 @@ def _get_skill_dirs(self) -> list: return plugin_dirs + skill_dirs def run(self): + LOG.debug("Starting Skills Service Thread") # Set the active lang to match the configured one set_default_lang(self.config.get("language", {}).get('internal') or self.config.get("lang") or "en-us") @@ -145,7 +147,13 @@ def run(self): set_default_tz() # Setup signal manager - self.bus = self.bus or get_messagebus() + try: + self.bus = self.bus or get_messagebus(timeout=300) + except TimeoutError as e: + LOG.exception(e) + self.status.set_error(repr(e)) + raise e + init_signal_bus(self.bus) init_signal_handlers() @@ -208,9 +216,10 @@ def _register_intent_services(self): return service def handle_wifi_setup_completed(self, _): - # Skills have been loaded, allow some time for time sync service - time.sleep(10) - self.bus.emit(Message("system.display.homescreen")) + self.bus.emit(Message('ovos.shell.status.ok')) + # # Skills have been loaded, allow some time for time sync service + # time.sleep(10) + # self.bus.emit(Message("system.display.homescreen")) def register_wifi_setup_events(self): self.bus.once("ovos.wifi.setup.completed", diff --git a/requirements/core_modules.txt b/requirements/core_modules.txt index 25d15cd2d..fad1204dc 100644 --- a/requirements/core_modules.txt +++ b/requirements/core_modules.txt @@ -1,6 +1,6 @@ # neon core modules neon_messagebus~=0.2 neon_gui~=1.0,>=1.0.1a1 -neon_enclosure~=1.0 +neon_enclosure~=1.0,>=1.0.1a2 neon_speech~=2.0,>=2.0.1a7 neon_audio~=1.1,>=1.1.1a0 diff --git a/requirements/local_speech_processing.txt b/requirements/local_speech_processing.txt index eef615455..b13678344 100644 --- a/requirements/local_speech_processing.txt +++ b/requirements/local_speech_processing.txt @@ -1,5 +1,5 @@ -neon-stt-plugin-deepspeech-stream-local==1.1.1a0 -neon-tts-plugin-coqui~=0.5,>=0.5.1a0 +neon-stt-plugin-deepspeech-stream-local>=1.1.1a2 +neon-tts-plugin-coqui~=0.5,>=0.6.1a0 # TODO: Local language plugin # Fallback TTS diff --git a/requirements/pi.txt b/requirements/pi.txt index 1de83e0ce..86eef53e3 100644 --- a/requirements/pi.txt +++ b/requirements/pi.txt @@ -7,23 +7,23 @@ neon-cli-client~=0.2 # Default plugins ovos-ww-plugin-vosk~=0.0,>=0.0.4 +neon-stt-plugin-google-cloud-streaming~=0.2,>=0.2.9a1 # PHAL Plugins ovos-phal-plugin-brightness-control-rpi>=1.0.0a3 ovos-phal-plugin-notification-widgets>=1.0.0a2 ovos-phal-plugin-color-scheme-manager>=1.0.0a2 ovos-phal-plugin-configuration-provider>=1.0.0a2 -ovos-phal-plugin-balena-wifi>=1.0.0a4 -ovos-phal-plugin-gui-network-client>=0.0.2a2 -ovos-phal-plugin-network-manager>=1.0.0a3 -ovos-phal-plugin-wifi-setup>=1.0.0a4 +ovos-phal-plugin-balena-wifi>=1.0.0a5 +ovos-phal-plugin-gui-network-client>=0.0.2a4 +ovos-phal-plugin-network-manager>=1.0.0a5 +ovos-phal-plugin-wifi-setup>=1.0.0a5 ovos-phal-plugin-dashboard>=0.0.1 ovos-phal-plugin-mk2>=0.0.1a2 -ovos-phal-plugin-alsa>=0.0.1a2 -ovos-phal-plugin-system>=0.0.2a4 -ovos-phal-plugin-notification-widgets>=1.0.0a2 -ovos-skill-setup @ git+https://github.com/OpenVoiceOS/skill-ovos-setup +ovos-phal-plugin-alsa~=0.0.2 +ovos-phal-plugin-system>=0.0.2a5 # Pi-specific skills -# TODO Homescreen advertises itself as mycroft-homescreen when pip installed, so we're not pip installing it -# ovos-skill-homescreen @ git+https://github.com/OpenVoiceOS/skill-ovos-homescreen +ovos-skill-homescreen @ git+https://github.com/OpenVoiceOS/skill-ovos-homescreen +# ovos-skill-setup @ git+https://github.com/OpenVoiceOS/skill-ovos-setup +ovos-skill-setup @ git+https://github.com/NeonGeckoCom/skill-device-setup@FEAT_SkipBackendSetup diff --git a/requirements/requirements.txt b/requirements/requirements.txt index ea6e052eb..1820cedf2 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,5 +1,5 @@ # mycroft -ovos-core[skills_lgpl]~=0.0.4,>=0.0.5a5 +ovos-core[skills_lgpl]~=0.0.4,>=0.0.5a21 # utils neon-utils[network,configuration]~=1.0,>=1.0.3a3 neon-transformers~=0.2 diff --git a/requirements/skills_extended.txt b/requirements/skills_extended.txt index 8dd82b3b0..5a2451db7 100644 --- a/requirements/skills_extended.txt +++ b/requirements/skills_extended.txt @@ -4,7 +4,7 @@ neon-skill-instructions neon-skill-launcher neon-skill-messaging # neon-skill-news -ovos-skill-news @ git+https://github.com/neondaniel/skill-news@REF_RequirementsHandling +skill-news @ git+https://github.com/openvoiceos/skill-ovos-news # neon-skill-recipes neon-skill-synonyms neon-skill-translation>=0.1.1a0 diff --git a/test/pi_setup.sh b/test/pi_setup.sh index 022bdad73..20ba7cad4 100644 --- a/test/pi_setup.sh +++ b/test/pi_setup.sh @@ -38,7 +38,7 @@ apt install -y curl curl https://forslund.github.io/mycroft-desktop-repo/mycroft-desktop.gpg.key | apt-key add - 2> /dev/null && \ echo "deb http://forslund.github.io/mycroft-desktop-repo bionic main" | tee /etc/apt/sources.list.d/mycroft-desktop.list apt update -apt install -y sox gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev python3.7-dev python3.7-venv mimic espeak-ng g++ || exit 1 +apt install -y sox gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev python3.7-dev python3.7-venv mimic espeak-ng g++ libjpeg-dev || exit 1 # Configure venv for deepspeech compat. cd /core || exit 10 From e2e9f885e8258e198fbb10b3d4e36a061a26e883 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Thu, 13 Oct 2022 02:14:24 +0000 Subject: [PATCH 35/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 834512b6c..3431f3521 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a15" +__version__ = "22.05.3a16" From 30b974e592b5fba7331cdf72a99132b5a2a66fdf Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 17 Oct 2022 10:36:25 -0700 Subject: [PATCH 36/44] Pi geolocation and settings cleanup (#296) * Update dependencies for Geolocation * Fix typo in added pi dependency * Update default configuration * Cleanup config changes Update skills to pip spec Co-authored-by: Daniel McKnight --- neon_core/configuration/neon.yaml | 15 +++++++-------- requirements/pi.txt | 4 ++-- requirements/skills_default.txt | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/neon_core/configuration/neon.yaml b/neon_core/configuration/neon.yaml index 59eddfac2..1caea4f6f 100644 --- a/neon_core/configuration/neon.yaml +++ b/neon_core/configuration/neon.yaml @@ -72,6 +72,8 @@ play_ogg_cmdline: ogg123 -q %1 # Speech Module confirm_listening: true listener: + wake_word: hey_neon + stand_up_word: wake_up sample_rate: 16000 mic_meter_ipc: true record_wake_words: false @@ -94,7 +96,7 @@ listener: ovos-vad-plugin-silero: threshold: 0.2 ovos-vad-plugin-webrtcvad: - vad_mode: 3 + vad_mode: 2 mute_during_output: true duck_while_listening: 0.3 phoneme_duration: 120 @@ -104,9 +106,7 @@ listener: recording_timeout_with_silence: 3.0 instant_listen: false hotwords: - hey mycroft: - active: false - hey neon: + hey_neon: module: ovos-ww-plugin-vosk listen: true sound: snd/start_listening.wav @@ -115,15 +115,14 @@ hotwords: lang: en samples: - hey neon - thank you: + thank_you: module: ovos-ww-plugin-vosk sound: snd/acknowledge.mp3 - active: false - wake up: + wake_up: module: ovos-ww-plugin-vosk - active: false # Skills skills: + run_gui_file_server: false wait_for_internet: false extra_directories: [] upload_skill_manifest: true diff --git a/requirements/pi.txt b/requirements/pi.txt index 86eef53e3..9695543a9 100644 --- a/requirements/pi.txt +++ b/requirements/pi.txt @@ -22,8 +22,8 @@ ovos-phal-plugin-dashboard>=0.0.1 ovos-phal-plugin-mk2>=0.0.1a2 ovos-phal-plugin-alsa~=0.0.2 ovos-phal-plugin-system>=0.0.2a5 +ovos-phal-plugin-ipgeo @ git+https://github.com/OpenVoiceOS/ovos-PHAL-plugin-ipgeo # Pi-specific skills ovos-skill-homescreen @ git+https://github.com/OpenVoiceOS/skill-ovos-homescreen -# ovos-skill-setup @ git+https://github.com/OpenVoiceOS/skill-ovos-setup -ovos-skill-setup @ git+https://github.com/NeonGeckoCom/skill-device-setup@FEAT_SkipBackendSetup +ovos-skill-setup @ git+https://github.com/OpenVoiceOS/skill-ovos-setup diff --git a/requirements/skills_default.txt b/requirements/skills_default.txt index 1c2353eac..18a66b448 100644 --- a/requirements/skills_default.txt +++ b/requirements/skills_default.txt @@ -10,7 +10,7 @@ neon-skill-spelling~=0.0.1 neon-skill-stock~=0.0.1,>=0.0.2a0 neon-skill-support_helper~=0.0.1,>=0.0.2a0 # neon-skill-update -neon-skill-user_settings~=0.0.1,>=0.0.2a2 +neon-skill-user_settings~=0.0.1,>=0.0.2a3 neon-skill-weather~=0.0.1 neon-skill-wikipedia~=0.3 neon-skill-free_music_archive>=0.0.1a0 From 899b3eb19f50e0ef9d118e33d9e709ed3c952baf Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 17 Oct 2022 17:36:48 +0000 Subject: [PATCH 37/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 3431f3521..d4effbdda 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a16" +__version__ = "22.05.3a17" From 4b2694538a77a4fc547f8db154bbcc093e3a0473 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 17 Oct 2022 18:14:30 -0700 Subject: [PATCH 38/44] Updated log handling (#295) * Troubleshoot skill_manager log init * Add `init_log` call in module init * Update log init to specify module name * Update neon-utils dependency to test changes * Update neon-utils dependency Refactor log name to `skills` for log file compat. * Add default logging config * Move log init to skills thread Update LOG reference to ovos_utils * Add XDG_STATE_HOME mapping in docker-compose for logging Update core modules to versions with updated log handling Co-authored-by: Daniel McKnight --- docker/docker-compose.yml | 7 ++++++- neon_core/configuration/__init__.py | 2 +- neon_core/configuration/neon.yaml | 16 ++++++++++++++++ neon_core/language/__init__.py | 2 +- neon_core/skills/__main__.py | 4 +++- neon_core/skills/skill_manager.py | 2 +- neon_core/skills/skill_store.py | 2 +- neon_core/util/qml_file_server.py | 2 +- neon_core/util/skill_utils.py | 2 +- requirements/core_modules.txt | 10 +++++----- requirements/requirements.txt | 2 +- test/test_configuration.py | 2 +- 12 files changed, 38 insertions(+), 15 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 2275f089b..84a81d84a 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -29,6 +29,7 @@ services: - XDG_CONFIG_HOME=/xdg/config - XDG_DATA_HOME=/xdg/data - XDG_CACHE_HOME=/xdg/cache + - XDG_STATE_HOME=/xdg/state neon-speech: container_name: neon-speech image: ghcr.io/neongeckocom/neon_speech:dev @@ -45,6 +46,7 @@ services: - XDG_CONFIG_HOME=/xdg/config - XDG_DATA_HOME=/xdg/data - XDG_CACHE_HOME=/xdg/cache + - XDG_STATE_HOME=/xdg/state devices: - /dev/snd:/dev/snd neon-skills: @@ -66,6 +68,7 @@ services: - XDG_CONFIG_HOME=/xdg/config - XDG_DATA_HOME=/xdg/data - XDG_CACHE_HOME=/xdg/cache + - XDG_STATE_HOME=/xdg/state devices: - /dev/snd:/dev/snd neon-audio: @@ -87,6 +90,7 @@ services: - XDG_CONFIG_HOME=/xdg/config - XDG_DATA_HOME=/xdg/data - XDG_CACHE_HOME=/xdg/cache + - XDG_STATE_HOME=/xdg/state devices: - /dev/snd:/dev/snd neon-gui: @@ -104,4 +108,5 @@ services: environment: - XDG_CONFIG_HOME=/xdg/config - XDG_DATA_HOME=/xdg/data - - XDG_CACHE_HOME=/xdg/cache \ No newline at end of file + - XDG_CACHE_HOME=/xdg/cache + - XDG_STATE_HOME=/xdg/state \ No newline at end of file diff --git a/neon_core/configuration/__init__.py b/neon_core/configuration/__init__.py index 24aeb78c9..89329683d 100644 --- a/neon_core/configuration/__init__.py +++ b/neon_core/configuration/__init__.py @@ -29,7 +29,7 @@ from ovos_config.config import Configuration from os.path import exists, isdir, dirname from os import makedirs -from neon_utils.logger import LOG +from ovos_utils.log import LOG """ Neon modules should import config from this module since module_overrides will diff --git a/neon_core/configuration/neon.yaml b/neon_core/configuration/neon.yaml index 1caea4f6f..4666b0be5 100644 --- a/neon_core/configuration/neon.yaml +++ b/neon_core/configuration/neon.yaml @@ -203,6 +203,22 @@ MQ: signal: use_signal_files: true max_wait_seconds: 300 + +# Logging Config +log_level: INFO +logs: + path: + max_bytes: 50000000 + backup_count: 3 + diagnostic: False + level_overrides: + error: [] + warning: + - filelock + - botocore + info: [] + debug: [] + PHAL: wait_for_gui: False diff --git a/neon_core/language/__init__.py b/neon_core/language/__init__.py index a91e2e3e4..bab69f101 100644 --- a/neon_core/language/__init__.py +++ b/neon_core/language/__init__.py @@ -30,7 +30,7 @@ from ovos_plugin_manager.language import load_lang_detect_plugin, \ load_tx_plugin -from neon_utils.logger import LOG +from ovos_utils.log import LOG from neon_core.configuration import Configuration, get_private_keys diff --git a/neon_core/skills/__main__.py b/neon_core/skills/__main__.py index 88d936ef6..a5d3abc3f 100644 --- a/neon_core/skills/__main__.py +++ b/neon_core/skills/__main__.py @@ -27,7 +27,8 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from neon_core.skills.service import NeonSkillService -from neon_utils.logger import LOG +from neon_utils.log_utils import init_log +from ovos_utils.log import LOG from mycroft.lock import Lock from mycroft.util import reset_sigint_handler, wait_for_exit_signal @@ -37,6 +38,7 @@ def main(*args, **kwargs): reset_sigint_handler() # Create PID file, prevent multiple instances of this service Lock('skills') + init_log(log_name="skills") service = NeonSkillService(*args, **kwargs) try: service.start() diff --git a/neon_core/skills/skill_manager.py b/neon_core/skills/skill_manager.py index 3f952ee74..f7cb6bda2 100644 --- a/neon_core/skills/skill_manager.py +++ b/neon_core/skills/skill_manager.py @@ -29,7 +29,7 @@ from os import makedirs from os.path import isdir, join, expanduser from ovos_utils.xdg_utils import xdg_data_home -from neon_utils.log_utils import LOG +from ovos_utils.log import LOG from neon_core.skills.skill_store import SkillsStore diff --git a/neon_core/skills/skill_store.py b/neon_core/skills/skill_store.py index 19300b7f2..92ebcf10c 100644 --- a/neon_core/skills/skill_store.py +++ b/neon_core/skills/skill_store.py @@ -31,7 +31,7 @@ from typing import List, Optional, Generator, Union from ovos_skills_manager.osm import OVOSSkillsManager from ovos_skills_manager.skill_entry import SkillEntry -from neon_utils.logger import LOG +from ovos_utils.log import LOG from neon_utils.net_utils import check_online from neon_utils.authentication_utils import repo_is_neon from datetime import datetime, timedelta diff --git a/neon_core/util/qml_file_server.py b/neon_core/util/qml_file_server.py index be98530e4..8918e99a3 100644 --- a/neon_core/util/qml_file_server.py +++ b/neon_core/util/qml_file_server.py @@ -33,7 +33,7 @@ from tempfile import gettempdir from os.path import isdir, join, dirname from threading import Thread, Event -from neon_utils.logger import LOG +from ovos_utils.log import LOG _HTTP_SERVER: socketserver.TCPServer = None diff --git a/neon_core/util/skill_utils.py b/neon_core/util/skill_utils.py index 6c40f295b..1313a8eb5 100644 --- a/neon_core/util/skill_utils.py +++ b/neon_core/util/skill_utils.py @@ -44,7 +44,7 @@ from ovos_skills_manager.session import SESSION, set_github_token, clear_github_token from ovos_skills_manager.github import normalize_github_url, get_branch_from_github_url, download_url_from_github_url from ovos_skill_installer import download_extract_zip -from neon_utils.logger import LOG +from ovos_utils.log import LOG from ovos_config.config import Configuration diff --git a/requirements/core_modules.txt b/requirements/core_modules.txt index fad1204dc..4602ddc22 100644 --- a/requirements/core_modules.txt +++ b/requirements/core_modules.txt @@ -1,6 +1,6 @@ # neon core modules -neon_messagebus~=0.2 -neon_gui~=1.0,>=1.0.1a1 -neon_enclosure~=1.0,>=1.0.1a2 -neon_speech~=2.0,>=2.0.1a7 -neon_audio~=1.1,>=1.1.1a0 +neon_messagebus~=0.2,>=0.2.1a3 +neon_gui~=1.0,>=1.0.1a5 +neon_enclosure~=1.0,>=1.0.1a3 +neon_speech~=2.0,>=2.0.1a10 +neon_audio~=1.1,>=1.1.1a4 diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 1820cedf2..7da73a7ad 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,7 +1,7 @@ # mycroft ovos-core[skills_lgpl]~=0.0.4,>=0.0.5a21 # utils -neon-utils[network,configuration]~=1.0,>=1.0.3a3 +neon-utils[network,configuration]~=1.0,>=1.0.3a6 neon-transformers~=0.2 ovos_utils~=0.0,>=0.0.24a2 ovos-config~=0.0,>=0.0.4 diff --git a/test/test_configuration.py b/test/test_configuration.py index 73caab729..ebb7dc454 100644 --- a/test/test_configuration.py +++ b/test/test_configuration.py @@ -34,7 +34,7 @@ from copy import deepcopy from pprint import pformat -from neon_utils.logger import LOG +from ovos_utils.log import LOG sys.path.append(os.path.dirname(os.path.dirname(__file__))) From 553cc299bf1751dbcf577f617c22914f528c4410 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 18 Oct 2022 01:14:54 +0000 Subject: [PATCH 39/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index d4effbdda..e384ad173 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a17" +__version__ = "22.05.3a18" From 0cd03e789fa0e8e76e8c509e48b85d63dd8c6a21 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Fri, 21 Oct 2022 14:22:55 -0700 Subject: [PATCH 40/44] Service callbacks for SystemD (#297) * Update dependencies to add systemd callback support * Add sdnotify dependency * Update requirements to stable versions Update core modules to test sdnotify changes * Update PHAL requirements to speed up dependency resolution * Update dependency versions * Update default plugin specs Add gpsd phal plugin * Pass skill thread service hooks to SkillManager * Troubleshooting systemd service lifecycle and ovos-workshop bug * Update gui and speech dependencies to PyPI versions * Update neon_enclosure dependency to pip spec * Cleanup service status handling and tests * Fix typo in license notice Bump Google STT plugin spec * Convert backwards-compat. `status` param to property with deprecation warning Co-authored-by: Daniel McKnight --- neon_core/skills/service.py | 39 ++++++++++++------------ requirements/core_modules.txt | 8 ++--- requirements/local_speech_processing.txt | 4 +-- requirements/pi.txt | 23 ++++++++------ requirements/requirements.txt | 15 +++++---- test/test_skills_module.py | 18 +++++------ 6 files changed, 56 insertions(+), 51 deletions(-) diff --git a/neon_core/skills/service.py b/neon_core/skills/service.py index d5dd1d147..615a51b19 100644 --- a/neon_core/skills/service.py +++ b/neon_core/skills/service.py @@ -34,7 +34,7 @@ from typing import Optional from threading import Thread -from mycroft_bus_client import Message +from mycroft_bus_client import Message, MessageBusClient from ovos_config.locale import set_default_lang, set_default_tz from ovos_config.config import Configuration from ovos_utils.log import LOG @@ -87,11 +87,10 @@ def __init__(self, Thread.__init__(self) LOG.debug("Starting Skills Service") self.setDaemon(daemonic) - self.bus = None + self.bus: MessageBusClient = None self.skill_manager = None self.http_server = None self.event_scheduler = None - self.status = None self.watchdog = watchdog self.callbacks = StatusCallbackMap(on_started=started_hook, on_alive=alive_hook, @@ -105,6 +104,12 @@ def __init__(self, patch_config(config) self.config = Configuration() + @property + def status(self): + LOG.warning("This reference is deprecated. " + "Use `NeonSkillService.skill_manager.status` directly.") + return self.skill_manager.status + def _init_gui_server(self): """ If configured, start the local file server to serve QML resources @@ -151,7 +156,7 @@ def run(self): self.bus = self.bus or get_messagebus(timeout=300) except TimeoutError as e: LOG.exception(e) - self.status.set_error(repr(e)) + self.callbacks.on_error(repr(e)) raise e init_signal_bus(self.bus) @@ -160,11 +165,15 @@ def run(self): # Setup Intents and Skill Manager self._register_intent_services() self.event_scheduler = EventScheduler(self.bus) - self.status = ProcessStatus('skills', self.bus, self.callbacks, - namespace="neon") SkillApi.connect_bus(self.bus) LOG.info("Starting Skill Manager") - self.skill_manager = NeonSkillManager(self.bus, self.watchdog) + self.skill_manager = NeonSkillManager( + bus=self.bus, watchdog=self.watchdog, + alive_hook=self.callbacks.on_alive, + started_hook=self.callbacks.on_started, + ready_hook=self.callbacks.on_ready, + error_hook=self.callbacks.on_error, + stopping_hook=self.callbacks.on_stopping) self.skill_manager.setName("skill_manager") self.skill_manager.start() LOG.info("Skill Manager started") @@ -176,17 +185,6 @@ def run(self): # Allow service to start if GUI file server fails LOG.exception(e) - # Update status - self.status.set_started() - - # TODO: These should be event-based in Mycroft/OVOS - # Wait for skill manager to start up - while not self.skill_manager.is_alive(): - time.sleep(0.1) - self.status.set_alive() - while not self.skill_manager.is_all_loaded(): - time.sleep(0.1) - self.status.set_ready() self.register_wifi_setup_events() announce_connection() @@ -229,8 +227,7 @@ def register_wifi_setup_events(self): def shutdown(self): LOG.info('Shutting down Skills service') - if self.status: - self.status.set_stopping() + # self.status.set_stopping() if self.event_scheduler is not None: self.event_scheduler.shutdown() @@ -241,4 +238,6 @@ def shutdown(self): if self.skill_manager is not None: self.skill_manager.stop() self.skill_manager.join() + + self.bus.close() LOG.info('Skills service shutdown complete!') diff --git a/requirements/core_modules.txt b/requirements/core_modules.txt index 4602ddc22..27fa17e17 100644 --- a/requirements/core_modules.txt +++ b/requirements/core_modules.txt @@ -1,6 +1,6 @@ # neon core modules -neon_messagebus~=0.2,>=0.2.1a3 -neon_gui~=1.0,>=1.0.1a5 -neon_enclosure~=1.0,>=1.0.1a3 -neon_speech~=2.0,>=2.0.1a10 +neon_messagebus~=0.2,>=0.2.1a4 +neon_gui~=1.0,>=1.0.1a7 +neon_enclosure~=1.0,>=1.0.1a4 +neon_speech~=2.0,>=2.0.1a11 neon_audio~=1.1,>=1.1.1a4 diff --git a/requirements/local_speech_processing.txt b/requirements/local_speech_processing.txt index b13678344..b717e1dc9 100644 --- a/requirements/local_speech_processing.txt +++ b/requirements/local_speech_processing.txt @@ -1,5 +1,5 @@ -neon-stt-plugin-deepspeech-stream-local>=1.1.1a2 -neon-tts-plugin-coqui~=0.5,>=0.6.1a0 +neon-stt-plugin-deepspeech-stream-local>=1.1.1a4 +neon-tts-plugin-coqui~=0.5,>=0.6.1a1 # TODO: Local language plugin # Fallback TTS diff --git a/requirements/pi.txt b/requirements/pi.txt index 9695543a9..8aa1fdc31 100644 --- a/requirements/pi.txt +++ b/requirements/pi.txt @@ -2,28 +2,31 @@ deepspeech @ https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-cp37-cp37m-linux_aarch64.whl vosk @ https://github.com/alphacep/vosk-api/releases/download/v0.3.30/vosk-0.3.30-py3-none-linux_aarch64.whl +# SystemD integration +sdnotify~=0.3 + # Default debug client neon-cli-client~=0.2 # Default plugins ovos-ww-plugin-vosk~=0.0,>=0.0.4 -neon-stt-plugin-google-cloud-streaming~=0.2,>=0.2.9a1 +neon-stt-plugin-google-cloud-streaming~=0.2,>=0.2.9a2 # PHAL Plugins -ovos-phal-plugin-brightness-control-rpi>=1.0.0a3 -ovos-phal-plugin-notification-widgets>=1.0.0a2 -ovos-phal-plugin-color-scheme-manager>=1.0.0a2 -ovos-phal-plugin-configuration-provider>=1.0.0a2 +ovos-phal-plugin-brightness-control-rpi>=1.0.0a4 +ovos-phal-plugin-notification-widgets>=1.0.0a4 +ovos-phal-plugin-color-scheme-manager>=1.0.0a3 +ovos-phal-plugin-configuration-provider>=1.0.0a3 ovos-phal-plugin-balena-wifi>=1.0.0a5 -ovos-phal-plugin-gui-network-client>=0.0.2a4 -ovos-phal-plugin-network-manager>=1.0.0a5 -ovos-phal-plugin-wifi-setup>=1.0.0a5 +ovos-phal-plugin-gui-network-client>=0.0.2a6 +ovos-phal-plugin-network-manager>=1.0.0a7 +ovos-phal-plugin-wifi-setup>=1.0.0a6 ovos-phal-plugin-dashboard>=0.0.1 ovos-phal-plugin-mk2>=0.0.1a2 ovos-phal-plugin-alsa~=0.0.2 -ovos-phal-plugin-system>=0.0.2a5 +ovos-phal-plugin-system>=0.0.2a6 ovos-phal-plugin-ipgeo @ git+https://github.com/OpenVoiceOS/ovos-PHAL-plugin-ipgeo - +ovos-phal-plugin-gpsd @ git+https://github.com/OpenVoiceOS/ovos-PHAL-plugin-gpsd # Pi-specific skills ovos-skill-homescreen @ git+https://github.com/OpenVoiceOS/skill-ovos-homescreen ovos-skill-setup @ git+https://github.com/OpenVoiceOS/skill-ovos-setup diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 7da73a7ad..9d6e10c31 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,18 +1,21 @@ # mycroft -ovos-core[skills_lgpl]~=0.0.4,>=0.0.5a21 +ovos-core[skills_lgpl]~=0.0.4,>=0.0.5a28 # utils -neon-utils[network,configuration]~=1.0,>=1.0.3a6 +neon-utils[network,configuration]~=1.0,>=1.0.3a8 neon-transformers~=0.2 -ovos_utils~=0.0,>=0.0.24a2 +ovos_utils~=0.0,>=0.0.25 ovos-config~=0.0,>=0.0.4 ovos-skills-manager~=0.0,>=0.0.11 -ovos-plugin-manager~=0.0.16,>=0.0.19a1 +ovos-plugin-manager~=0.0.16,>=0.0.19a8 psutil~=5.6 # default plugins -neon-lang-plugin-libretranslate~=0.1,>=0.1.3a1 +neon-lang-plugin-libretranslate~=0.2 neon-utterance-translator-plugin~=0.1 -neon-utterance-normalizer-plugin~=0.0.0,>=0.0.1a0 +neon-utterance-normalizer-plugin~=0.0.2 # text parser modules RAKEkeywords~=0.2 + +# Patching min version +ovos-workshop>=0.0.9a1 \ No newline at end of file diff --git a/test/test_skills_module.py b/test/test_skills_module.py index 7b150e26f..5da7d4f65 100644 --- a/test/test_skills_module.py +++ b/test/test_skills_module.py @@ -86,7 +86,7 @@ def tearDownClass(cls) -> None: def test_neon_skills_service(self, run, install_default): from neon_core.skills.service import NeonSkillService from neon_core.skills.skill_manager import NeonSkillManager - from mycroft.util.process_utils import ProcessState + # from mycroft.util.process_utils import ProcessState config = {"skills": { "disable_osm": False, @@ -98,11 +98,11 @@ def test_neon_skills_service(self, run, install_default): started = Event() - def started_hook(): + def ready_hook(): started.set() alive_hook = Mock() - ready_hook = Mock() + started_hook = Mock() error_hook = Mock() stopping_hook = Mock() service = NeonSkillService(alive_hook, started_hook, ready_hook, @@ -120,15 +120,15 @@ def started_hook(): self.assertIsNotNone(service.http_server) self.assertTrue(service.config['skills']['auto_update']) install_default.assert_called_once() - run.assert_called_once() + # Check mock method called + run.assert_called_once() + # Mock status change calls from mocked `run` self.assertIsInstance(service.skill_manager, NeonSkillManager) - service.skill_manager.status.state = ProcessState.ALIVE - sleep(1) + service.skill_manager.status.set_alive() alive_hook.assert_called_once() - service.skill_manager.status.state = ProcessState.READY - sleep(1) - ready_hook.assert_called_once() + service.skill_manager.status.set_ready() + started_hook.assert_called_once() service.shutdown() stopping_hook.assert_called_once() From c80a662c717f1fd1513d89920d70d074bc34d0cf Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Fri, 21 Oct 2022 21:23:16 +0000 Subject: [PATCH 41/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index e384ad173..92d551b0f 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a18" +__version__ = "22.05.3a19" From 69e8282cd58c0e4f093663e08231e60acf847a81 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 31 Oct 2022 19:13:27 -0700 Subject: [PATCH 42/44] Stable dependencies (#298) * Update to stable dependencies Update all required, essential, and default skills * Update core module dependencies * Update core modules to stable releases Update default skills to stable releases * Update OPM dependency to include fix * Update dependencies to stable or locked alpha versions * Update dependencies Co-authored-by: Daniel McKnight --- requirements/core_modules.txt | 10 ++++---- requirements/local_speech_processing.txt | 4 ++-- requirements/pi.txt | 2 +- requirements/remote_speech_processing.txt | 2 +- requirements/requirements.txt | 10 ++++---- requirements/skills_default.txt | 28 +++++++++++------------ requirements/skills_essential.txt | 10 ++++---- requirements/skills_extended.txt | 2 -- requirements/skills_required.txt | 2 +- 9 files changed, 34 insertions(+), 36 deletions(-) diff --git a/requirements/core_modules.txt b/requirements/core_modules.txt index 27fa17e17..ae16e90dd 100644 --- a/requirements/core_modules.txt +++ b/requirements/core_modules.txt @@ -1,6 +1,6 @@ # neon core modules -neon_messagebus~=0.2,>=0.2.1a4 -neon_gui~=1.0,>=1.0.1a7 -neon_enclosure~=1.0,>=1.0.1a4 -neon_speech~=2.0,>=2.0.1a11 -neon_audio~=1.1,>=1.1.1a4 +neon_messagebus~=0.3 +neon_gui~=1.1 +neon_enclosure~=1.1 +neon_speech~=3.0 +neon_audio~=1.2 diff --git a/requirements/local_speech_processing.txt b/requirements/local_speech_processing.txt index b717e1dc9..e28926df4 100644 --- a/requirements/local_speech_processing.txt +++ b/requirements/local_speech_processing.txt @@ -1,5 +1,5 @@ -neon-stt-plugin-deepspeech-stream-local>=1.1.1a4 -neon-tts-plugin-coqui~=0.5,>=0.6.1a1 +neon-stt-plugin-deepspeech-stream-local~=2.0 +neon-tts-plugin-coqui~=0.7 # TODO: Local language plugin # Fallback TTS diff --git a/requirements/pi.txt b/requirements/pi.txt index 8aa1fdc31..bdf3cffde 100644 --- a/requirements/pi.txt +++ b/requirements/pi.txt @@ -10,7 +10,7 @@ neon-cli-client~=0.2 # Default plugins ovos-ww-plugin-vosk~=0.0,>=0.0.4 -neon-stt-plugin-google-cloud-streaming~=0.2,>=0.2.9a2 +neon-stt-plugin-google-cloud-streaming~=1.0 # PHAL Plugins ovos-phal-plugin-brightness-control-rpi>=1.0.0a4 diff --git a/requirements/remote_speech_processing.txt b/requirements/remote_speech_processing.txt index ea555b062..22062b7e1 100644 --- a/requirements/remote_speech_processing.txt +++ b/requirements/remote_speech_processing.txt @@ -1,4 +1,4 @@ -neon-stt-plugin-google-cloud-streaming~=0.2,>=0.2.9a0 +neon-stt-plugin-google-cloud-streaming~=1.0 neon-tts-plugin-polly~=0.2 neon-lang-plugin-amazon_translate~=0.1 diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 9d6e10c31..6725e61fc 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,12 +1,12 @@ # mycroft -ovos-core[skills_lgpl]~=0.0.4,>=0.0.5a28 +ovos-core[skills_lgpl]==0.0.5a35 # utils -neon-utils[network,configuration]~=1.0,>=1.0.3a8 +neon-utils[network,configuration]~=1.1 neon-transformers~=0.2 ovos_utils~=0.0,>=0.0.25 ovos-config~=0.0,>=0.0.4 -ovos-skills-manager~=0.0,>=0.0.11 -ovos-plugin-manager~=0.0.16,>=0.0.19a8 +ovos-skills-manager~=0.0.11 +ovos-plugin-manager==0.0.20a1 psutil~=5.6 @@ -18,4 +18,4 @@ neon-utterance-normalizer-plugin~=0.0.2 RAKEkeywords~=0.2 # Patching min version -ovos-workshop>=0.0.9a1 \ No newline at end of file +ovos-plugin-manager==0.0.20a1 diff --git a/requirements/skills_default.txt b/requirements/skills_default.txt index 18a66b448..1ed0cedfb 100644 --- a/requirements/skills_default.txt +++ b/requirements/skills_default.txt @@ -1,16 +1,16 @@ skill-ddg @ git+https://github.com/openvoiceos/skill-ddg -neon-skill-alerts~=1.0,>=1.0.1a0 -neon-skill-caffeinewiz~=0.2,>=0.2.1a0 -neon-skill-data_controls~=0.1,>=0.1.1a0 -neon-skill-fallback_wolfram_alpha~=0.0.1,>=0.0.2a0 -neon-skill-personal~=0.0.1,>=0.0.2a0 -neon-skill-speak~=0.0.1 -neon-skill-speed_test~=0.2 -neon-skill-spelling~=0.0.1 -neon-skill-stock~=0.0.1,>=0.0.2a0 -neon-skill-support_helper~=0.0.1,>=0.0.2a0 +neon-skill-alerts~=1.0,>=1.0.1 +neon-skill-caffeinewiz~=0.2,>=0.2.1 +neon-skill-data_controls~=0.1,>=0.1.1 +neon-skill-fallback_wolfram_alpha~=0.0.1,>=0.0.2 +neon-skill-personal~=0.0.1,>=0.0.2 +neon-skill-speak~=0.0.2 +neon-skill-speed_test~=0.2,>=0.2.1 +neon-skill-spelling~=0.0.2 +neon-skill-stock~=0.1 +neon-skill-support_helper~=0.0.2 # neon-skill-update -neon-skill-user_settings~=0.0.1,>=0.0.2a3 -neon-skill-weather~=0.0.1 -neon-skill-wikipedia~=0.3 -neon-skill-free_music_archive>=0.0.1a0 +neon-skill-user_settings~=0.1 +neon-skill-weather~=0.0.2 +neon-skill-wikipedia~=0.3,>=0.3.1 +neon-skill-free_music_archive~=0.0.1 diff --git a/requirements/skills_essential.txt b/requirements/skills_essential.txt index 29ef37824..7f9955f10 100644 --- a/requirements/skills_essential.txt +++ b/requirements/skills_essential.txt @@ -1,5 +1,5 @@ -neon-skill-about~=0.0.1 -neon-skill-date_time~=0.0.1 -neon-skill-demo~=0.0.1,>=0.0.2a0 -neon-skill-device_controls~=0.0.1 -neon-skill-ip_address~=0.0.2 +neon-skill-about~=0.0.2 +neon-skill-date_time~=0.0.2 +neon-skill-demo~=0.1 +neon-skill-device_controls~=0.0.2 +neon-skill-ip_address~=0.0.3 diff --git a/requirements/skills_extended.txt b/requirements/skills_extended.txt index 5a2451db7..b53f0c899 100644 --- a/requirements/skills_extended.txt +++ b/requirements/skills_extended.txt @@ -3,10 +3,8 @@ neon-skill-custom_conversation neon-skill-instructions neon-skill-launcher neon-skill-messaging -# neon-skill-news skill-news @ git+https://github.com/openvoiceos/skill-ovos-news # neon-skill-recipes neon-skill-synonyms neon-skill-translation>=0.1.1a0 -# neon-skill-avmusic neon-skill-camera diff --git a/requirements/skills_required.txt b/requirements/skills_required.txt index 364768386..093ff6f10 100644 --- a/requirements/skills_required.txt +++ b/requirements/skills_required.txt @@ -1,3 +1,3 @@ ovos-skill-stop @ git+https://github.com/openvoiceos/skill-ovos-stop neon-skill-fallback_unknown~=0.0.2 -neon-skill-communication~=0.0.1 \ No newline at end of file +neon-skill-communication~=0.0.2 \ No newline at end of file From 760fa374ca819e66e23072e91339dcbbaf997de6 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 1 Nov 2022 02:13:52 +0000 Subject: [PATCH 43/44] Increment Version --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 92d551b0f..4f80f2236 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a19" +__version__ = "22.05.3a20" From 25fa8678bf220fbfb453339a5da835f9c9629470 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 31 Oct 2022 20:02:57 -0700 Subject: [PATCH 44/44] Bump version to 22.10 (#300) --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 4f80f2236..455f64fa5 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "22.05.3a20" +__version__ = "22.10"