Add reproducible Piper TTS service
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user