Can't get docker-compose for the satellite / wakeword / mic / snd containers working

tl;dr - does anyone have a working docker-compose for the new rhasspy/wyoming-satellite container?

To start, it’s all Docker over here. All the way down.

I was previously running the synesthesiam/homeassistant-satellite container ( built from git ) on Raspberry pi’s ( There’s a 3 and a 2 ) feeding to a centrally hosted wyoming-openwakeword instance on a beefier server. This had a lot of false positives, but generally worked. These both have the reSpeaker 4 mic pihat on them.

I’ve been trying to get the new rhasspy/wyoming-satellite container up and running for about a month now off and on with that same hardware stack. No luck at all.

I’ve tried:

  • Started with build from github / master branch for all containers
  • Using the same centralized openwakeword container and feeding to it. This container works with the old synesthesiam version of homeassistant-satellite
  • Using on-Satellite based openwakeword containers and feeding to those
  • Bumping both centralized and satellite based openwakeword containers to use openwakeword 1.8.2 ( which works fine with the synesthesiam version )
  • exec-ing into the wyoming-mic-external container when it’s running to validate it’s recording ( it is, I can save this out to a mounted folder and listen to myself )
  • adding alsa-utils into the rhasspy/wyoming-satellite container, doing an arecord out to a mounted folder and validating I can hear myself ( not really sure what I was testing here, I think I was throwing spaghetti )
  • throwing a TON of debug statements in rhasspy/wyoming-satellite to see where it’s failing
  • throwing the events being passed to wyoming-openwakeword into the logs too, they look like events w/ audio data attached.
  • setting wyoming-openwakeword to show debug-probability
  • setting wyoming-openwakeword to pipe to an output-dir

Here’s the docker-compose.yaml I’m using. You can see some of the various testing stuff in there commented out.

version: '3.8'
services:
  playback:
    container_name: wyoming-snd-external
    build: https://github.com/rhasspy/wyoming-snd-external.git
    image: wyoming-snd-external
    restart: unless-stopped
    ports:
      - "10601:10601"
    devices:
      - /dev/snd:/dev/snd
    group_add:
      - audio
    command: 
      - "--device"
      - "plughw:CARD=Headphones"
      - "--debug"
  microphone:
    container_name: wyoming-mic-external
    build: https://github.com/rhasspy/wyoming-mic-external.git
    image: wyoming-mic-external
    restart: unless-stopped
    ports: 
      - "10600:10600"
    devices:
      - /dev/snd:/dev/snd
    group_add:
      - audio
    depends_on:
      - satellite
    command:
      # - "--program"
      # - "arecord -D plughw:CARD=seeed4micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t wav -d 5 ./out/test.wav"
      - "--device"
      - "plughw:CARD=seeed4micvoicec"
      - "--debug"
#    volumes:
#      - ./mic/out:/app/out
  openwakeword:
    container_name: openwakeword
    build: https://github.com/Graimalkin/wyoming-addons.git#maint--bump-version-of-openwakeword-being-used:openwakeword
    # build: https://github.com/rhasspy/wyoming-addons.git#master:openwakeword
    image: wyoming-openwakeword
    restart: unless-stopped
    ports:
      - "10400:10400"
    command:
      - "--uri"
      - "tcp://0.0.0.0:10400"
      - "--debug"
      - "--debug-probability"
      - "--preload-model"
      - "hey_jarvis"
      - "--output-dir"
      - "/app/out"
    volumes:
      - ./openwakeword/out:/app/out
  satellite:
    container_name: wyoming-satellite
    build: https://github.com/graimalkin/wyoming-satellite.git#test--debugging-not-streaming-to-openwakeword
    # build: https://github.com/rhasspy/wyoming-satellite.git
    image: wyoming-satellite
    hostname: office
    restart: unless-stopped
    ports:
      - "10700:10700"
    command:
    # - "-h"
      - "--name"
      - "office"
      - "--uri"
      - "tcp://0.0.0.0:10700"
      - "--mic-uri"
      - "tcp://microphone:10600"
      - "--snd-uri"
      - "tcp://playback:10601"
      - "--debug"
      - "--awake-wav"
      - "sounds/awake.wav"
      - "--done-wav"
      - "sounds/done.wav"
      - "--wake-uri"
      - "tcp://openwakeword:10400"
      - "--wake-word-name"
      - "hey_jarvis"

I’m getting this with the “debug” version of wyoming-satellite:

From what I can see, it looks like it’s streaming to the openwakeword container. However, openwakeword isn’t responding at all - I see it loading the model in logs, but nothing about detection. Also, there are no files being created in the ./openwakeword/out folder.

I really don’t want to go digging into the openwakeword container / docker traffic, so I’m hoping that someone out there has a working docker-compose for this.

Rebuilt everything after the latest update and it’s working now. :raised_hands:

You’re getting further than I have. I’m not using docker compose and have just set everything up ‘manually’, but for me if hears the wakeword because it then plays the awake sound, but then nothing. So the mic, snd, and openwakeword containers must be working, but it’s then doing nothing. Not sure where to go from here.

bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
DEBUG:root:Namespace(mic_uri='tcp://wyoming-mic:10600', mic_command=None, 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='tcp://wyoming-snd:10601', snd_command=None, snd_command_rate=22050, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri='tcp://wyoming-openwakeword:10400', wake_word_name=['hey_karen'], 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=None, transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, awake_wav='/sounds/Speech On.wav', done_wav='/sounds/Speech Off.wav', uri='tcp://0.0.0.0:10700', name='Pi3B', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug=True)
INFO:root:Ready
DEBUG:root:Detected IP: 172.17.0.3
DEBUG:root:Zeroconf discovery enabled (name=0242ac110003, host=None)
DEBUG:root:Connecting to mic service: tcp://wyoming-mic:10600
DEBUG:root:Connecting to snd service: tcp://wyoming-snd:10601
DEBUG:root:Connecting to wake service: tcp://wyoming-openwakeword:10400
INFO:root:Connected to services
DEBUG:root:Connected to mic service
DEBUG:root:Connected to wake service
DEBUG:root:Streaming audio
DEBUG:root:Connected to snd service

Once it detects the wakeword and ‘does nothing’ I have to restart the containers to get it working again.

I’ve build a docker image for the satellite that you can use and run right away. Find it here GitHub - sker65/wyoming-satellite: Remote voice satellite using Wyoming protocol. image is here https://hub.docker.com/repository/docker/sker65/wyoming-satellite
currently it is build for amd64 (not arm). If you need arm just ping me.
Documentation on how to use it: here
The docker image includes only the satellite, but a docker-compose for all (whisper, piper, open_wakeword + satellite) should be easy.