From d015dd044b5b92c87f12eb0c68e8b50f335fe0ac Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Sun, 9 Nov 2025 08:24:00 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=9D=20Fix:=20Use=20absolute=20paths=20?= =?UTF-8?q?for=20Piper=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SOLUTION FOUND! Piper requires ABSOLUTE paths to model files, not relative paths. Changes: - Update voice_to_speaker.default.yaml to use /app/voices/... absolute paths - Update Makefile voices target to set absolute paths via sed - Tested: Piper works with /app/voices/en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx Root cause: PyPI piper-tts package doesn't auto-download voices or support voice name resolution. Must use full absolute file paths. Co-Authored-By: Claude --- Makefile | 8 ++++---- voice_to_speaker.default.yaml | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 9a14809..caccbfb 100644 --- a/Makefile +++ b/Makefile @@ -75,8 +75,8 @@ voices: cd /app/voices/en/en_GB/northern_english_male/medium && \ curl -L https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_GB/northern_english_male/medium/en_GB-northern_english_male-medium.onnx -o en_GB-northern_english_male-medium.onnx && \ curl -L https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_GB/northern_english_male/medium/en_GB-northern_english_male-medium.onnx.json -o en_GB-northern_english_male-medium.onnx.json'" - @echo "📝 Updating voice_to_speaker.yaml..." + @echo "📝 Updating voice_to_speaker.yaml with ABSOLUTE paths..." ssh $(REMOTE_USER)@$(REMOTE_HOST) "docker exec $(CONTAINER_NAME) bash -c '\ - sed -i \"s|model: voices/en_US-libritts_r-medium.onnx|model: voices/en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx|g\" /app/config/voice_to_speaker.yaml && \ - sed -i \"s|model: voices/en_GB-northern_english_male-medium.onnx|model: voices/en/en_GB/northern_english_male/medium/en_GB-northern_english_male-medium.onnx|g\" /app/config/voice_to_speaker.yaml'" - @echo "✅ Voices installed!" + sed -i \"s|model: voices/en_US-libritts_r-medium.onnx|model: /app/voices/en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx|g\" /app/config/voice_to_speaker.yaml && \ + sed -i \"s|model: voices/en_GB-northern_english_male-medium.onnx|model: /app/voices/en/en_GB/northern_english_male/medium/en_GB-northern_english_male-medium.onnx|g\" /app/config/voice_to_speaker.yaml'" + @echo "✅ Voices installed with absolute paths!" diff --git a/voice_to_speaker.default.yaml b/voice_to_speaker.default.yaml index afce1a6..7f5b22a 100644 --- a/voice_to_speaker.default.yaml +++ b/voice_to_speaker.default.yaml @@ -3,25 +3,25 @@ model: voices/choose your own model.onnx speaker: set your own speaker alloy: - model: voices/en_US-libritts_r-medium.onnx + model: /app/voices/en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx speaker: 79 # 64, 79, 80, 101, 130 echo: - model: voices/en_US-libritts_r-medium.onnx + model: /app/voices/en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx speaker: 134 # 52, 102, 134 echo-alt: - model: voices/en_US-ryan-high.onnx - speaker: # default speaker + model: /app/voices/en_US-ryan-high.onnx + speaker: # default speaker (DISABLED - model not included) fable: - model: voices/en_GB-northern_english_male-medium.onnx + model: /app/voices/en/en_GB/northern_english_male/medium/en_GB-northern_english_male-medium.onnx speaker: # default speaker onyx: - model: voices/en_US-libritts_r-medium.onnx + model: /app/voices/en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx speaker: 159 # 55, 90, 132, 136, 137, 159 nova: - model: voices/en_US-libritts_r-medium.onnx + model: /app/voices/en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx speaker: 107 # 57, 61, 107, 150, 162 shimmer: - model: voices/en_US-libritts_r-medium.onnx + model: /app/voices/en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx speaker: 163 tts-1-hd: alloy-alt: