Issues with wyoming piper docker unraid container and getting voices to work

Hey, so I’ve managed to get faster-whisper and piper up and running on my unraid server docker (linuxserver containers) and faster-whisper worked out of the box. Piper however doesn’t work even though it connects via wyoming, when I check the console log (Imgur: The magic of the Internet) it seems that it can’t find the voice model even though I’m using everything default (picked lessac medium in home assistant because I’ve seen it’s in appdata folder of piper, also created proper folder structure found in ordinary piper and also copied lessac medium over there to no avail).

Dunno, kinda lost. Anyone have any experiences?

Can you copy/paste logs next time? Same with any code.

i dont use linuxserver.io image but from look of log seems it cant find image maybe. I didnt read very deeply.

I use this/these

services:

##########################################
#          STT - FasterWhisper           #
##########################################
  whisper:
    container_name: whisperstt
    hostname: whisper
    user: "1020:1020"
    restart: unless-stopped
    image: rhasspy/wyoming-whisper:2.5.0
    command: --model tiny-int8 --language en
    environment:
      - HF_HUB_CACHE=/tmp
#      - language= en
#      - PUID=1020
#      - PGID=1020
#      - TZ=America/Chicago
    networks:
      proxylocal:
      proxywan:
    volumes:
      - /srv/main/docker/havoice/whisper/data:/data
#    ports:
#      - 10300:10300
    deploy:
      resources:
        limits:
          cpus: '3'
          memory: 5000M
        reservations:
          cpus: '3'
          memory: 2000M

          


##########################################
#             OpenWakeWord               #
##########################################

  wakeword:
    container_name: openwakeword
    hostname: openwakeword
    user: "1020:1020"
    restart: unless-stopped
    image: rhasspy/wyoming-openwakeword:2.0.0
#    ports:
#      - 10400:10400
     
    volumes:
      - /srv/main/docker/havoice/openwakeword/custom:/custom
    environment:
      - preload-model=ok_nabu
      - custom-model-dir=/custom
    networks:
      proxylocal:
      #proxywan:
    deploy:
      resources:
        limits:
          cpus: '3'
          memory: 5000M
        reservations:
          cpus: '3'
          memory: 2000M

##########################################
#                TTS-Piper               #
##########################################
#docker run -it -p 10200:10200 -v /path/to/local/data:/data rhasspy/wyoming-piper \ --voice en_US-lessac-medium

  pipertts:
    container_name: pipertts
    hostname: pipertts
    user: "1020:1020"
    #user: 1002:1002
    restart: "unless-stopped"
    image: rhasspy/wyoming-piper:1.6.3
    volumes:
       - /srv/main/docker/application/piper/data:/data/
#    ports:
#      - "5500:5500"
    command: --voice en_US-lessac-medium
#    environment:

#      PGID: 1002
#      PUID: 1002
    networks:
      proxylocal:
      proxywan:
    deploy:
      resources:
        limits:
          cpus: '3'
          memory: 5000M
        reservations:
          cpus: '3'
          memory: 2000M

##########################################
#              NETWORKS                  #
##########################################      
networks:
  proxylocal:
    external: true
  proxywan:
    external: true

the users indicated are users created on host linux system. you can remove the user and group stuff and it should run just fine.

The network, proxylan and proxywan, are bridge networks i created in docker.

At the end I just made my own Docker image like you did, works fine now after pointing /config to /data for custom voices.

Posting this for anyone in the future if they may have a similar problem

mkdir -p /mnt/user/appdata/piper-build

.

cd /mnt/user/appdata/piper-build

.

nano Dockerfile

Inside dockerfile paste the following:

FROM rhasspy/wyoming-piper:1.6.3

WORKDIR /data

RUN python3 -m wyoming_piper.download \
    --voice en_US-lessac-medium \
    --data-dir /data

RUN mkdir -p /tmp && chmod 777 /tmp

ENV VOICE=en_US-lessac-medium

EXPOSE 10200

CMD ["--voice", "en_US-lessac-medium"]

Press CTRL+X , press Y, press Enter to save and you should be back inside Terminal

Do the same for build.sh, type

nano build.sh

And paste in

#!/bin/bash

docker build -t custom-piper:latest .

echo "Build complete! Image tagged as: custom-piper:latest"
echo "You can now use this in your docker-compose or Unraid"

CTRL+X, Y, Enter

Now go into your Docker tab in Unraid, click “Add Container” button (remove previous Piper if you have iT), use a bridge interface, port 10200, host path /mnt/user/appdata/piper, access mode R/W, also add voice --voice en_US-lessac-medium (idk why everyone uses this as a starting voice but it worked for me)

Anyway at this point just point wyoming to your IP:10200 and it should work with home assistant

That’s a compose file. I did not make docker image.:grinning:

You took the long way around but as long as you got there😀