Install Docker on Linux
Follow the official Docker installation guide for your Linux distribution. This will allow you to run Docker containers, which are necessary for running Whisper and Piper.
Set Up Docker Containers for Whisper and Piper
First, make sure you are logged in as superuser
sudo su
Whisper (Speech-to-Text)
mkdir ${HOME}/whisper-data
docker run -it -p 10300:10300 \
-v ${HOME}/whisper-data:/data \
rhasspy/wyoming-whisper \
--model tiny-int8 --language en
Piper (Text-to-Speech)
mkdir ${HOME}/piper-data
docker run -it -p 10200:10200 \
-v ${HOME}/piper-data:/data \
rhasspy/wyoming-piper \
--voice en_US-lessac-medium
Replace --language en
and --voice en_US-lessac-medium
with the appropriate settings for your language.
Configure Home Assistant
- Navigate in Home Assistant to Settings > Devices & Services > Add Integration.
- Choose "Wyoming Protocol" from the list.
- Enter the IP address of your Linux machine and the ports you exposed (10300 for Whisper and 10200 for Piper).
Preparation Before Shipping
Stop Docker Containers
If they're running, stop them:
docker stop
If you don't know the container names, use:
docker stop $(docker ps -aq)
Save Docker Image Locally (Optional but Recommended)
Save the images so the customer doesn't need to download them if offline:
docker save -o whisper_image.tar rhasspy/wyoming-whisper:latest
docker save -o piper_image.tar rhasspy/wyoming-piper:latest
Include these .tar files with the ODROID-H4 or provide them through another means.
Script for Starting Containers
Create a script for the customer to run. Here's an example shell script:
#!/bin/bash
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "Docker is not running. Please start Docker and try again."
exit 1
fi
# Load Whisper image if not present (optional, if images were saved)
if ! docker images -q rhasspy/wyoming-whisper:latest > /dev/null 2>&1; then
docker load -i whisper_image.tar
fi
# Load Piper image if not present (optional, if images were saved)
if ! docker images -q rhasspy/wyoming-piper:latest > /dev/null 2>&1; then
docker load -i piper_image.tar
fi
# Start Whisper container
docker run -d --name whisper -p 10300:10300 -v "${HOME}/whisper-data:/data" rhasspy/wyoming-whisper --model tiny-int8 --language en
# Start Piper container
docker run -d --name piper -p 10200:10200 -v "${HOME}/piper-data:/data" rhasspy/wyoming-piper --voice en_US-lessac-medium
echo "Services started. Whisper is running on port 10300 and Piper on port 10200."
If running on Windows instead of Linux:
Install Docker on Windows
Download and install Docker Desktop from the official Docker website. This will allow you to run Docker containers on your Windows system, which is necessary for running Whisper and Piper.
Set Up Docker Containers for Whisper and Piper
Whisper (Speech-to-Text)
docker run -it -p 10300:10300 ^
-v C:\path\to\whisper-data:/data ^
rhasspy/wyoming-whisper ^
--model tiny-int8 --language en
Adjust C:\path\to\whisper-data
to a directory on your Windows machine where Whisper can store its data.
Piper (Text-to-Speech)
docker run -it -p 10200:10200 `
-v C:\path\to\piper-data:/data `
rhasspy/wyoming-piper `
--voice en_US-lessac-medium
Adjust C:\path\to\piper-data
to where you want Piper's data stored. Replace --language en
and --voice en_US-lessac-medium
with the appropriate settings for your language.
Configure Home Assistant
- Navigate in Home Assistant to Settings > Devices & Services > Add Integration.
- Choose "Wyoming Protocol" from the list.
- Enter the IP address of your Windows laptop and the ports you exposed (10300 for Whisper and 10200 for Piper).
Preparation Before Shipping
Stop Docker Containers
If they're running, stop them:
docker stop
If you don't know the container names, use:
docker stop $(docker ps -aq)
Save Docker Image Locally (Optional but Recommended)
Save the images so the customer doesn't need to download them if offline:
docker save -o whisper_image.tar rhasspy/wyoming-whisper:latest
docker save -o piper_image.tar rhasspy/wyoming-piper:latest
Include these .tar files with the laptop or provide them through another means.
Script for Starting Containers
Create a batch or PowerShell script for the customer to run. Here's an example PowerShell script:
# Start-Services.ps1
# Check if Docker is running
if (-not (Get-Process "Docker Desktop" -ErrorAction SilentlyContinue)) {
Write-Output "Docker Desktop is not running. Please start it and try again."
exit
}
# Load Whisper image if not present (optional, if images were saved)
if (-not (docker images -q rhasspy/wyoming-whisper:latest)) {
docker load -i whisper_image.tar
}
# Load Piper image if not present (optional, if images were saved)
if (-not (docker images -q rhasspy/wyoming-piper:latest)) {
docker load -i piper_image.tar
}
# Start Whisper container
docker run -d --name whisper -p 10300:10300 -v "C:\path\to\whisper-data:/data" rhasspy/wyoming-whisper --model tiny-int8 --language en
# Start Piper container
docker run -d --name piper -p 10200:10200 -v "C:\path\to\piper-data:/data" rhasspy/wyoming-piper --voice en_US-lessac-medium
Write-Output "Services started. Whisper is running on port 10300 and Piper on port 10200."
Replace C:\path\to\whisper-data
and C:\path\to\piper-data
with the actual paths on the customer's machine or ensure these directories exist.