Skip to content

Commit

Permalink
Add default configuration
Browse files Browse the repository at this point in the history
Read device_description from config
  • Loading branch information
NeonDaniel committed Feb 7, 2024
1 parent b6e0fac commit fc0a861
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
45 changes: 45 additions & 0 deletions neon_nodes/configuration/system.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion neon_nodes/voice_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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'),
Expand Down
3 changes: 1 addition & 2 deletions requirements/voice_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc0a861

Please sign in to comment.