Skip to content

Latest commit

 

History

History

piper

CONTAINERS IMAGES RUN BUILD

Wyoming piper

Home Assistant add-on that uses wyoming-piper for text-to-speech system using the wyoming protocol on NVIDIA Jetson devices. Thank you to @ms1design for contributing these Home Assistant & Wyoming containers!

Features

Requires Home Assistant 2023.9 or later.

docker-compose example

If you want to use docker compose to run Home Assistant Core Voice Assistant Pipeline on a Jetson device with cuda enabled, you can find a full example docker-compose.yaml here.

name: home-assistant-jetson
version: "3.9"
services:
  homeassistant:
    image: dustynv/homeassistant-core:latest-r36.2.0
    restart: unless-stopped
    init: false
    privileged: true
    network_mode: host
    container_name: homeassistant
    hostname: homeassistant
    ports:
      - "8123:8123"
    volumes:
      - ha-config:/config
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro

  piper-tts:
    image: dustynv/wyoming-piper:master-r36.2.0
    restart: unless-stopped
    network_mode: host
    container_name: piper-tts
    hostname: piper-tts
    runtime: nvidia
    init: false
    ports:
      - "10200:10200/tcp"
    devices:
      - /dev/snd:/dev/snd
      - /dev/bus/usb
    volumes:
      - ha-piper-tts-models:/data/models/piper
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro

volumes:
  ha-config:
  ha-piper-tts-models:

Environment variables

Variable Type Default Description
PIPER_PORT str 10200 Port number to use on host
PIPER_CACHE str /data/models/piper Name of a default mounted location available for downloading the models
PIPER_UPDATE_VOICES bool true Download latest voices.json during startup
PIPER_LENGTH_SCALE float 1.0 Phoneme length
PIPER_NOISE_SCALE float 0.667 Generator noise
PIPER_NOISE_W float 0.333 Phoneme width noise
PIPER_SPEAKER [str, int] 0 Name or id of speaker for default voice
PIPER_VOICE str en_US-lessac-high Default Piper voice to use (e.g., en_US-lessac-medium) from list of available voices
PIPER_MAX_PROC int 1 Maximum number of piper process to run simultaneously
PIPER_DEBUG bool true Log DEBUG messages

Configuration

Read more how to configure wyoming-piper in the official documentation:

Wyoming assist-microphone

Available Voices

List of available voices to download is available here.

TODO's

  • Testing

Support

Got questions? You have several options to get them answered:

For general Home Assistant Support:

For NVIDIA Jetson based Home Assistant Support:

Note

This project was created by Jetson AI Lab Research Group.

CONTAINERS
wyoming-piper:master
   Aliases wyoming-piper
   Requires L4T ['>=34.1.0']
   Dependencies build-essential homeassistant-base cuda cudnn python:3.11 tensorrt cmake numpy onnx onnxruntime piper-tts
   Dockerfile Dockerfile
   Images dustynv/wyoming-piper:master-r35.4.1 (2024-04-30, 7.4GB)
dustynv/wyoming-piper:master-r36.2.0 (2024-04-30, 9.0GB)
   Notes The piper-tts using the wyoming protocol for usage with Home Assistant. Based on https://github.com/home-assistant/addons/tree/master/piper and https://github.com/rhasspy/wyoming-piper
RUN CONTAINER

To start the container, you can use jetson-containers run and autotag, or manually put together a docker run command:

# automatically pull or build a compatible container image
jetson-containers run $(autotag piper)

# or if using 'docker run' (specify image and mounts/ect)
sudo docker run --runtime nvidia -it --rm --network=host piper:35.2.1

jetson-containers run forwards arguments to docker run with some defaults added (like --runtime nvidia, mounts a /data cache, and detects devices)
autotag finds a container image that's compatible with your version of JetPack/L4T - either locally, pulled from a registry, or by building it.

To mount your own directories into the container, use the -v or --volume flags:

jetson-containers run -v /path/on/host:/path/in/container $(autotag piper)

To launch the container running a command, as opposed to an interactive shell:

jetson-containers run $(autotag piper) my_app --abc xyz

You can pass any options to it that you would to docker run, and it'll print out the full command that it constructs before executing it.

BUILD CONTAINER

If you use autotag as shown above, it'll ask to build the container for you if needed. To manually build it, first do the system setup, then run:

jetson-containers build piper

The dependencies from above will be built into the container, and it'll be tested during. Run it with --help for build options.