Wyoming satellite - How to check if audio does stream through?

Hi,

I’ve read quite a few posts and blog entries about this, but I can’t seem to find how to diagnose my issue…

My HA setup is docker based, and I’ve added whisper, piper and poenwakeword to the compose mix. I configured all of them in HA through the wyoming integration, and the containers logs seem to indicate everything is running fine.

However, my HA server is in a cupboard, and I won’t speak directly to it. So I’m using a Pi Zero to run wyoming-satellite and stream its audio to the rest of the party. I’ve tried the arecord and aplay commands separately, redirecting output to a file, and it all seems to work fine on that end.

The satellite output is encouraging at first:

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, mic_seconds_to_mute_after_awake_wav=0.5, mic_no_mute_during_awake_wav=False, mic_channel_index=None, 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, wake_refractory_seconds=5.0, 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=None, transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command=None, tts_played_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, connected_command=None, disconnected_command=None, timer_started_command=None, timer_updated_command=None, timer_cancelled_command=None, timer_finished_command=None, awake_wav=None, done_wav=None, timer_finished_wav=None, timer_finished_wav_repeat=(1, 0), uri='tcp://0.0.0.0:10700', name='name', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug_recording_dir=None, debug=True, log_format='%(levelname)s:%(name)s:%(message)s')
INFO:root:Ready
DEBUG:root:Detected IP: 192.168.X.X
DEBUG:root:Zeroconf discovery enabled (name=b827ebad6f49, 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
DEBUG:root:Connected to mic service
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
DEBUG:root:Server set: 10867647907044
INFO:root:Connected to server
INFO:root:Streaming audio
DEBUG:root:Event(type='run-pipeline', data={'start_stage': 'wake', 'end_stage': 'tts', 'restart_on_end': True, 'snd_format': {'rate': 22050, 'width': 2, 'channels': 1}}, payload=None)
DEBUG:root:Ping enabled

But then… nothing seems to happen ?

When I speak to Assist through the web frontend, I can see in the whisper logs it has received audio and processed it:

INFO:__main__:Ready
INFO:faster_whisper:Processing audio with duration 00:02.640
INFO:wyoming_faster_whisper.handler: Ok Naboo.

But when I speak to the satellite, nothing happens. The openwakeword logs are desperately empty:

INFO:root:Ready
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.

I’m not sure if this is of substance to my particular issue, but I guess it might very well be, so I got to add that in my HA logs, I also have a lot of the following:

2024-06-04 19:02:27.293 WARNING (MainThread) [homeassistant.components.wyoming.satellite] Satellite has been disconnected. Reconnecting in 10 second(s)
2024-06-04 19:03:17.569 WARNING (MainThread) [homeassistant.components.wyoming.satellite] Satellite has been disconnected. Reconnecting in 10 second(s)
2024-06-04 19:03:57.629 WARNING (MainThread) [homeassistant.components.wyoming.satellite] Satellite has been disconnected. Reconnecting in 10 second(s)
2024-06-04 19:04:57.669 WARNING (MainThread) [homeassistant.components.wyoming.satellite] Satellite has been disconnected. Reconnecting in 10 second(s)
2024-06-04 19:05:17.432 WARNING (MainThread) [homeassistant.components.wyoming.satellite] Satellite has been disconnected. Reconnecting in 10 second(s)
2024-06-04 19:06:39.168 WARNING (MainThread) [homeassistant.components.wyoming.satellite] Satellite has been disconnected. Reconnecting in 10 second(s)

So I guess my question is: how do I check that the satellite is indeed streaming audio ? Or even better, how do I confirm that HA is indeed receiving it ?

Thanks for your help !

Could it be you need to update the wyoming-satellite service?

Well, unfortunately, nothing that simple:

$ git pull
Already up to date.
$

Thanks for your reply !

I just tried installing Wyoming Satellite on an Raspberry Pi 4B, with a Respeaker hat, using these instructions:

And it works fine from here, so I don’t really know what to suggest other than making sure the Pi has a good connection to your router (preferably Ethernet).

You could also try and run the script with the --debug switch, and see if you can spot something awry.

Thanks a lot for helping !

The output in my first post is actually obtained with the --debug switch, but there’s not much there that helps. In any case, I only mentioned this “reconnect” issue in order to be through in my description of my setup and its behavior, but reading the thread you pointed to, it does not seem to block the satellite from working anyways…

In the end, my question was less about those specific messages, and more about how I could verify that the satellite is in fact streaming audio to HA.

I assume that if the logs in HA are empty, then nothing has been sent. Do you know if the wakeword is actually being detected on the Pi? You can make it play a sound when it detects the wakeword.

This is a Pi Zero (1st gen), so I’m trying to keep things very light on it and offload everything (including wakeword detection) to the HA host. All I want the Pi to do with wyoming-satellite is to stream its audio to the openwakeword and/or whisper containers (I’ve tried with and without wakeword in the assist pipeline). But nothing seems to be sent, so I guess I’m doing something very wrong somewhere…

And indeed, that was the case. I had somehow missed the part about the openwakeword wiring in the readme (probably because I precisely did not want local openwakeword detection) and thought HA was doing it by itself since the openwakeword uri is also configured in the assist pipeline in the GUI.

Adding that to my satellite script/run command line did the trick and my satellite now hears me and answers :tada:

Thanks again for your interest in helping me @zenzay42 :slight_smile: