rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
492 stars 70 forks source link

Network(?) issue when connecting through docker #129

Open moritzschaefer opened 4 months ago

moritzschaefer commented 4 months ago

I am using the Dockerfile to run a docker container for the satellite (as I do with homeassistant, piper and whisper).

However, while all services nicely connect and integrate into Wyoming in my Homeassistant, the satellite fails to so, despite being configured in the same way the other containers are.

The satellite does not connect automatically to HA, and adding it manually via the Wyoming protocol integration leads to "No services found at endpoint". Notably, when I provide a different Host address or Port, it searches for a long while, so it seems that the network connection is fine to some degree.

Below the debug output of my docker container.

[I] moritz@moxps ~/wyoming-satellite (master)> docker logs  wyoming-satellite
DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -D plughw:1,0 -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 -D plughw:0,0 -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, awake_wav=None, done_wav=None, uri='tcp://0.0.0.0:10700', name='living_room', 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: 172.20.0.3
DEBUG:root:Zeroconf discovery enabled (name=0242ac140003, host=None)
DEBUG:root:Connecting to mic service: ['arecord', '-D', 'plughw:1,0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to snd service: ['aplay', '-D', 'plughw:0,0', '-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

Here the process spawned by the docker: root 6623 0.1 0.0 105144 25256 ? Sl 18:25 0:01 /app/.venv/bin/python3 -m wyoming_satellite --uri tcp://0.0.0.0:10700 --name living_room --mic-command arecord -D plughw:1,0 -r 16000 -c 1 -f S16_LE -t raw --snd-command aplay -D plughw:0,0 -r 22050 -c 1 -f S16_LE -t raw --debug

Any help is greatly appreciated!

EDIT: also posted here: https://community.home-assistant.io/t/how-to-debug-a-wyoming-satellite/706197

moritzschaefer commented 4 months ago

I tested some further and I don't suspect it's a network issue anymore, but it is really challenging to pinpoint what else it should be. Is there a convenient command-line way to check the functionality of the satellite service?