Is it possible to run HA Voice on Docker? Or forget ?!

Hi Everyone,

Running HA on Docker Portainer in an Ubuntu machine here.

I would like to play around with the HA Voice.

I am not finding a good tutorial / step by step ! Is this because the Voice doesn’t work very well with docker due to the missing Add-on functionality ?

I am very lost here ! Is it worth to try or better to wait some months until things get more stable ?

Marcelo

This is what I have been using. (Portainer on Debian host)

version: "3"
services:
## wyoming includes whisper and piper
  whisper: # stt
    container_name: whisper
    command: 
      --model small
      --language en
      --beam-size 1
    image: rhasspy/wyoming-whisper:latest
    volumes:
      - /home/pcwii/docker/whisper:/data
    environment:
      - TZ=America/Toronto
    restart: unless-stopped
    ports:
      - 10301:10300
# Piper Text To Speech
  piper: # tts
    container_name: piper
    image: rhasspy/wyoming-piper:latest
    command: 
      --voice en-us-libritts-high
    volumes:
      - /home/pcwii/docker/piper:/data
    environment:
      - TZ=America/Toronto
    restart: unless-stopped
    ports:
      - 10201:10200
# Open Wake Word Dection 
  openwakeword:
    container_name: openwakeword
    image: rhasspy/wyoming-openwakeword:latest
    command: 
      --preload-model 'kelsey'
      --custom-model-dir /custom
      --model 'hey kelsey'
      --model 'kelsey'
      --uri 'tcp://0.0.0.0:10400'
    volumes:
      - /home/pcwii/docker/openwakeword-data:/data
      - /home/pcwii/docker/openwakeword-data:/custom  # Place my custom wakewords here
    environment:
      - TZ=America/Toronto
    restart: unless-stopped
    ports:
      - 10400:10400
      - 10400:10400/udp
3 Likes
1 Like

Hi Guys

Thank you @Tinkerer !!!

Piper seems ok, OpenWakeWord too but the “whisper” docker is not comming up.

This is the error:

/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     6 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     6 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"

I tried using your whisper composer and it didn’t work so I tried to change a little.

This is what I have now:

  whisper: # stt
    container_name: whisper
    command:
      --model tiny-int8
      --language en
      --beam-size 1
    image: rhasspy/wyoming-whisper:latest
    volumes:
      - /home/pcwii/docker/whisper:/data
    environment:
      - TZ=America/New_York
    restart: unless-stopped
    ports:
      - 10300:10300

Some Suggestion?

The volumes: is definitely wrong since that is the data path on my system. Update it with a path on your docker system.
That may explain your error.
This will be the location where the model is downloaded to.

Hi @pcwii

So, mkdir /opt/whisper/ and

  whisper: # stt
    container_name: whisper
    command:
      --model tiny-int8
      --language en
      --data-dir /data
      --download-dir /data
    image: rhasspy/wyoming-whisper
    volumes:
      - /opt/whisper:/data
    environment:
      - TZ=America/New_York
    restart: unless-stopped
    ports:
      - 10301:10300

and a little better now but still with error.

/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"
/run.sh: line 5:     7 Illegal instruction     (core dumped) python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data "$@"

When I run docker ps I see

f8be5160c1f0 rhasspy/wyoming-whisper "bash /run.sh -m wyo…" 6 minutes ago Restarting (132) 45 seconds ago whisper

I think the containner is not even starting.

If I try to run

docker exec -it f8be5160c1f0 /bin/sh

I see

Error response from daemon: Container f8be5160c1f09445ca45a9fed30679eb22784838aff3fc1179738c8f1a541a1d is restarting, wait until the container is running

I tried to delete and recreate many times

See here: Whisper container not working: Service exited with code 256 (by signal 4) on x86_64 · Issue #3035 · home-assistant/addons · GitHub