rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
587 stars 85 forks source link

Wyoming Integration entries create multiple time randomly on Home assistant #27

Open kizovinh opened 8 months ago

kizovinh commented 8 months ago

I am using the Ubuntu server on a Raspberry Pi 4. I ran the service by systemd and it worked well. But sometimes it stops working, and wake word doesn't response, then I went to Home Assistant and saw that a new entry for Wyoming integration is created, like my previous entry. If I configure it, the wake word works again, I can delete this entry afterward. But it happened randomly, I think it is because when the service re-connects, home assistant understands that it is a new integration.

kizovinh commented 8 months ago

image Here is one example

danielk117 commented 8 months ago

I've got a simular behaviour. I called script/run with the option --name $HOSTNAME, which shows me a discovered device in HA. Once configurated, after restarting the satellite service, (sometimes, not everytime) the satellite never starts streaming audio. But for me, there is no new device discovered.

I need to delete my old device in HA, than there is a new device with the same name discovered, which i can configure. After this, I need to restart the satellite service and than it starts streaming audio and wake word detection is working again.

Before deleting device:

DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -r 16000 -c 1 -f S16_LE -t raw', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=0, mic_auto_gain=0, snd_uri=None, snd_command='aplay -r 22050 -c 1 -f S16_LE -t raw', snd_command_rate=22050, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri=None, wake_word_name=[], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri=None, startup_command=None, detect_command=None, detection_command='/bin/show_led 1', transcript_command=None, stt_start_command=None, stt_stop_command='/bin/show_led 3', synthesize_command=None, tts_start_command='/bin/show_led 0', tts_stop_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, awake_wav='sounds/awake.wav', done_wav='sounds/done.wav', uri='tcp://0.0.0.0:10700', name='LX06-9341', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug=True)
INFO:root:Ready
DEBUG:root:Detected IP: 192.168.170.22
DEBUG:root:Zeroconf discovery enabled (name=5c02141a2aeb, host=None)
DEBUG:root:Connecting to mic service: ['arecord', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to snd service: ['aplay', '-r', '22050', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
INFO:root:Connected to services
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
DEBUG:root:Connected to mic service
grafik

After deleting device:

grafik

After (re)configuring device:

DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -r 16000 -c 1 -f S16_LE -t raw', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=0, mic_auto_gain=0, snd_uri=None, snd_command='aplay -r 22050 -c 1 -f S16_LE -t raw', snd_command_rate=22050, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri=None, wake_word_name=[], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri=None, startup_command=None, detect_command=None, detection_command='/bin/show_led 1', transcript_command=None, stt_start_command=None, stt_stop_command='/bin/show_led 3', synthesize_command=None, tts_start_command='/bin/show_led 0', tts_stop_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, awake_wav='sounds/awake.wav', done_wav='sounds/done.wav', uri='tcp://0.0.0.0:10700', name='LX06-9341', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug=True)
INFO:root:Ready
DEBUG:root:Detected IP: 192.168.170.22
DEBUG:root:Zeroconf discovery enabled (name=5c02141a2aeb, host=None)
DEBUG:root:Connecting to mic service: ['arecord', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to snd service: ['aplay', '-r', '22050', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
INFO:root:Connected to services
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
DEBUG:root:Connected to mic service
DEBUG:root:Server set: 42135010670506
INFO:root:Streaming audio
danielk117 commented 8 months ago

I've noticed thats enough for me to simply reload the satellite integration in HA instead of deleting/reconfiguring it.

grafik
artphdent commented 8 months ago

Same problem here, built the Wyoming satellite and it failed to stream to HA after reboot but as danielk117 above states a reload sorts it out until next time