Add reproducible Piper TTS service

This commit is contained in:
Mikei386
2026-08-21 17:02:32 +02:00
parent 53dfffc289
commit a5cf11582a
19 changed files with 316 additions and 34 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
set -eu
data_dir=${PIPER_DATA_DIR:-/data}
voice=${PIPER_VOICE:-de_DE-thorsten-high}
mkdir -p "$data_dir"
chown 10003:10003 "$data_dir"
if [ ! -s "$data_dir/$voice.onnx" ] || [ ! -s "$data_dir/$voice.onnx.json" ]; then
echo "Downloading Piper voice: $voice"
gosu piper python -m piper.download_voices --data-dir "$data_dir" "$voice"
fi
exec gosu piper python /app/piper_worker.py