Home Assistant
add-on that uses wyoming-satellite
for remote voice satellite using the wyoming
protocol on NVIDIA Jetson devices. Thank you to @ms1design for contributing these Home Assistant & Wyoming containers!
- Works well with
home-assistant-core
container on Jetson devices as well as Home Assistant hosted on different hosts - Uses the
wyoming-openwakeword
container to detect wake words - Uses the
wyoming-whisper
container to handleSTT
- Uses the
wyoming-piper
container to handleTTS
Requires Home Assistant
2023.9
or later.
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
assist-microphone:
image: dustynv/wyoming-assist-microphone:latest-r36.2.0
restart: unless-stopped
network_mode: host
container_name: assist-microphone
hostname: assist-microphone
runtime: nvidia
init: false
ports:
- "10700:10700/tcp"
devices:
- /dev/snd:/dev/snd
- /dev/bus/usb
volumes:
- ha-assist-microphone:/share
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
SATELLITE_AUDIO_DEVICE: "plughw:CARD=S330,DEV=0"
SATELLITE_SND_VOLUME_MULTIPLIER: 0.3
WAKEWORD_NAME: "ok_nabu"
ASSIST_PIPELINE_NAME: "Home Assistant"
volumes:
ha-config:
ha-assist-microphone:
Variable | Type | Default | Description |
---|---|---|---|
SATELLITE_NAME |
str |
assist microphone |
Name of the satellite |
SATELLITE_AUDIO_DEVICE |
str |
plughw:CARD=S330,DEV=0 |
Selected Audio Device to use, read more here |
SATELLITE_PORT |
str |
10700 |
Port of the satellite |
SATELLITE_SOUND_ENABLED |
bool |
true |
Enable or disable connected Speaker |
SATELLITE_AWAKE_WAV |
str |
/usr/src/sounds/awake.wav |
WAV file to play when wake word is detected |
SATELLITE_DONE_WAV |
str |
/usr/src/sounds/done.wav |
WAV file to play when voice command is done |
ASSIST_PIPELINE_NAME |
str |
Home Assistant |
Home Assistant Voice Assistant Pipeline name to run |
WAKEWORD_SERVICE_URI |
str |
tcp://127.0.0.1:10400 |
URI of Wyoming wake word detection service |
WAKEWORD_NAME |
str |
ok_nabu |
Name of wake word to listen for |
SATELLITE_SND_VOLUME_MULTIPLIER |
float |
1.0 |
Sound volume multiplier |
SATELLITE_MIC_VOLUME_MULTIPLIER |
float |
1.0 |
Mic volume multiplier |
SATELLITE_MIC_AUTO_GAIN |
int |
0 |
Mic auto gain |
SATELLITE_MIC_NOISE_SUPPRESSION |
int |
0 |
Mic noise suppression (0-4 ) |
SATELLITE_DEBUG |
bool |
true |
Log DEBUG messages |
Read more how to configure wyoming-assist-microphone
in the official documentation.
Picking the correct microphone/speaker devices is critical for the satellite to work.
List your available microphones with:
arecord -L
List your available speakers with:
aplay -L
You should see similar output to below for both commands:
plughw:CARD=seeed2micvoicec,DEV=0
seeed-2mic-voicecard, bcm2835-i2s-wm8960-hifi wm8960-hifi-0
Hardware device with all software conversions
Prefer ones that start with plughw:
or just use default
if you don't know what to use. It's recommended to choose Microphone and Speaker which has Hardware device with all software conversions
notation. Set the environment variable SATELLITE_AUDIO_DEVICE
to:
plughw:CARD=seeed2micvoicec,DEV=0
wyoming-assist-microphone
uses the same device for Mic as Speaker.
- Investigate whether the user should see the transcription of voice commands and responses in the Home Assistant Assist Chat popup when the name of the conversational pipeline is passed as
ASSIST_PIPELINE_NAME
. - Split
SATELLITE_AUDIO_DEVICE
intoSATELLITE_MIC_DEVICE
andSATELLITE_SND_DEVICE
to allow selection of different audio hardware combinations.
Got questions? You have several options to get them answered:
- The Home Assistant Discord Chat Server.
- The Home Assistant Community Forum.
- Join the Reddit subreddit in
/r/homeassistant
- In case you've found an bug in Home Assistant, please open an issue on our GitHub.
- The NVIDIA Jetson AI Lab tutorials section.
- The Jetson AI Lab - Home Assistant Integration thread on NVIDIA's Developers Forum.
- In case you've found an bug in
jetson-containers
, please open an issue on our GitHub.
Note
This project was created by Jetson AI Lab Research Group.
CONTAINERS
wyoming-assist-microphone:latest |
|
---|---|
Aliases | wyoming-assist-microphone |
Requires | L4T ['>=34.1.0'] |
Dependencies | build-essential homeassistant-base python:3.11 |
Dockerfile | Dockerfile |
Images | dustynv/wyoming-assist-microphone:latest-r35.4.1 (2024-04-30, 5.1GB) dustynv/wyoming-assist-microphone:latest-r36.2.0 (2024-04-30, 0.3GB) |
Notes | The assist-microphone using the wyoming protocol for usage with Home Assistant. Based on https://github.com/home-assistant/addons/tree/master/assist_microphone |
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 assist-microphone)
# or if using 'docker run' (specify image and mounts/ect)
sudo docker run --runtime nvidia -it --rm --network=host assist-microphone:35.2.1
jetson-containers run
forwards arguments todocker 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 assist-microphone)
To launch the container running a command, as opposed to an interactive shell:
jetson-containers run $(autotag assist-microphone) 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 assist-microphone
The dependencies from above will be built into the container, and it'll be tested during. Run it with --help
for build options.