From fc0a86171393169b7fc8cd2d801061db91033d32 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 7 Feb 2024 13:57:47 -0800 Subject: [PATCH] Add default configuration Read device_description from config --- neon_nodes/configuration/system.yaml | 45 ++++++++++++++++++++++++++++ neon_nodes/voice_client.py | 4 ++- requirements/voice_client.txt | 3 +- 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 neon_nodes/configuration/system.yaml diff --git a/neon_nodes/configuration/system.yaml b/neon_nodes/configuration/system.yaml new file mode 100644 index 0000000..2f0c64d --- /dev/null +++ b/neon_nodes/configuration/system.yaml @@ -0,0 +1,45 @@ +neon_node: + description: Neon Node +microphone: + module: ovos-microphone-plugin-alsa +listener: + wake_word: hey_mycroft + stand_up_word: "" + VAD: + silence_method: vad_only + 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 + mute_during_output: true + instant_listen: false + enable_stt_api: false + # amount of time to wait for speech to start after WW detection + speech_begin: 0.5 + # amount of time without speech to wait before stopping listening + silence_end: 0.9 + # TODO: tune below params with WW disabled + # number of audio chunks from WW detection to include in STT audio + utterance_chunks_to_rewind: 1 + wakeword_chunks_to_save: 15 +sounds: + start_listening: /opt/neon/start_listening.wav + error: /opt/neon/error.wav +hotwords: + hey_mycroft: + module: ovos-ww-plugin-precise-lite + model: /opt/neon/hey_mycroft.tflite + expected_duration: 3 + trigger_level: 3 + sensitivity: 0.5 + listen: true + wake_up: + enabled: false + wake_up_vosk: + enabled: false +logs: + path: stdout + level: DEBUG \ No newline at end of file diff --git a/neon_nodes/voice_client.py b/neon_nodes/voice_client.py index 017944a..e955329 100644 --- a/neon_nodes/voice_client.py +++ b/neon_nodes/voice_client.py @@ -82,6 +82,7 @@ def __init__(self, bus=None, ready_hook=on_ready, error_hook=on_error, self.stopping_hook = stopping_hook alive_hook() self.config = Configuration() + self._device_data = self.config.get('neon_node', {}) LOG.init(self.config.get("logging")) self.bus = bus or FakeBus() self.lang = self.config.get('lang') or "en-us" @@ -145,7 +146,8 @@ def network_info(self) -> dict: @property def node_data(self): if not self._node_data: - self._node_data = {"device_description": "test client", + self._node_data = {"device_description": self._node_data.get( + 'description', 'node voice client'), "networking": { "local_ip": self.network_info.get('ipv4'), "public_ip": self.network_info.get('public'), diff --git a/requirements/voice_client.txt b/requirements/voice_client.txt index d1411c8..e1e0578 100644 --- a/requirements/voice_client.txt +++ b/requirements/voice_client.txt @@ -2,8 +2,7 @@ neon-utils[network]~=1.8,>=1.8.3a4 ovos-dinkum-listener~=0.0.2,>=0.0.3a27 ovos-vad-plugin-silero~=0.0.1 ovos-microphone-plugin-alsa~=0.0.0 -ovos-microphone-plugin-sounddevice -# TODO: Sounddevice plugin? +# ovos-microphone-plugin-sounddevice Not working on Mark2 where alsa is ovos-ww-plugin-precise-lite[tflite]~=0.1 pydub~=0.25 SpeechRecognition~=3.10