openWakeWord Docker

Hi,

Trying to get local voice assistant up and running (whisper, piper & openWakeWord).

I’m running HA 2023.10.1 on a docker container (Synology 918+).

I have Piper & Whisper containers up and running - and I’ve them as integrations in HA.
My openWakeWord container is up and running as well - but I do not find any integration to add in HA
(Settings–>Devices & Services → Add integration). I.e. the Wake Word engine states “No matching entities found” when I configure a voice assistant.

Docker compose for openWakeWord

services:
  openwakeword:
    container_name: openWakeWord
    image: dalehumby/openwakeword-rhasspy
    volumes:
      - /volume2/docker/openWakeWord/data:/data
    environment:
      - TZ=Europe/Stockholm
    restart: unless-stopped
    ports:
      - 12202:12202/udp

Any suggestions or solutions?

1 Like

Where is your config file. The Docs say it should be at /config of OWW container

Got the solution,

In the Wyoming integration just click add entry

Then just fill the fields with to good information :slight_smile: in your example the port : 12202 for the host part i think you know :slight_smile:

5 Likes

Great - thanks for input! Still get “Failed to connect” when in try to add it. What am I missing? (Whisper, Piper & OneWakeWord containers are up and running. My MQTT broker is working as it should).

My docker-compose for OneWakeWord:

services:
  openwakeword:
    container_name: openWakeWord
    image: dalehumby/openwakeword-rhasspy
    volumes:
      - /volume2/docker/openWakeWord/config:/config
    environment:
      - TZ=Europe/Stockholm
    restart: unless-stopped
    ports:
      - 12202:12202/udp

and my config file in OpenWakeWord is

  broker: <Removed>
  port: 1883
  username: <Removed>  # Login to broker. Delete if not required
  password: <Removed>  # Login to broker. Delete if not required

# Open Wake Word config
oww:
  model_names:  # From https://github.com/dscripka/openWakeWord/blob/2d663e8c680320360738813ecd4a71faad3213e2/openwakeword/__init__.py
    - alexa  # Delete to ignore this wake-word

  activation_samples: 3  # Number of samples in moving average
  activation_threshold: 0.7  # Trigger wakeword when average above this threshold
  deactivation_threshold: 0.2  # Do not trigger again until average falls below this threshold
  # OWW config, see https://github.com/dscripka/openWakeWord#recommendations-for-usage
  vad_threshold: 0.5
  enable_speex_noise_suppression: false

udp_ports:
  base: 12202  # Delete or change as needed type or paste code here

Try this, no config file needed…

##
  openwakeword:
    container_name: openwakeword
    image: rhasspy/wyoming-openwakeword
    user: 1001:1001
    networks:
      - hass
    volumes:
      - ./wakeword:/data
      - ./wakeword:/custom
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
      - TZ=Australia/Melbourne
    command: --preload-model 'ok_nabu' --custom-model-dir /custom
    restart: unless-stopped

Skip the user and network parts if they don’t suit you… for me HA, Whisper, Piper and OWW all run in the same stack…

EDIT: By default OWW uses port 10400. You will need to manually add it as per Tarlak’s comment above.
Cheers.

2 Likes

any idea how can I setup openWakeWord on nas, while Home Assistant runs in a docker container on pi4 32bit?

Thanks a lot! Seems like a good setup to run it all in one stack - but I will probably do them one-by-one since I already got Piper & Whisper good to go (I suppose this make no difference?).

3 Question:

  • for the volumes - I suppose I should put “/volume2/docker/openWakeWord/data:/data” & “/volume2/docker/openWakeWord/custom:/custom” then? (I need to create the custom folder)? and the timezone and local time I can skip?
  • what does the user part do?
  • for the command (–preload-model ‘ok_nabu’ --custom-model-dir /custom) - do I need to download anything and put in the custom folder or how does this work?

Thanks again!

Yes, you can point the volume mounts wherever you like, and they can both point to the same folder for OWW as far as I can tell…
The user part runs the container as user with uid ‘1001’ rather than root… this limits the permissions the container has. Need to be aware of permissions on the containers data folders when you do this.
Nope, there is 5 or 6 ‘built-in’ wakewords that can be used, you only need to add something if you want a custom wakeword.
Cheers.

this worked good for me, thanks!

Awesome - my docker-compose is up an running, and the Voice assistant in HA is configured with openWakeWord. So now I’m just waiting to receive my Atom Echo’s to try it out…

Thanks a lot for the support!

Hi Fredrik

do you mind posting the whole “shabang”, c-à-d all the HA-related entries in you docker-compose ?

Tx
Mario

hey Fraddles, thanks! I’ve set up using this compose and it worked like a charm! :slight_smile: I’m now having a little trouble with the AtomEcho part (link to topic here) , but the pipeline + wake word are fine :slight_smile:

1 Like