feat(hermes): Piper TTS (local US male, no cloud) #17

Merged
gortium merged 25 commits from feat/voice-support-v2 into master 2026-05-09 19:39:12 +00:00
3 changed files with 134 additions and 40 deletions
Showing only changes of commit 90e227bc4e - Show all commits

View File

@@ -43,14 +43,14 @@ COPY --chown=hermes:hermes . .
RUN uv venv && \
uv pip install --no-cache-dir piper-tts sounddevice numpy faster-whisper
# ---------- Télécharger la voix Piper Norman ----------
# ---------- Télécharger la voix Piper Ryan (high quality) ----------
RUN mkdir -p /opt/hermes/.venv/share/piper/voices && \
/opt/hermes/.venv/bin/python3 /dev/stdin << 'PYEOF' && rm -f /tmp/dl_voice.py
/opt/hermes/.venv/bin/python3 /dev/stdin << 'PYEOF'
import urllib.request
base = '/opt/hermes/.venv/share/piper/voices'
url = 'https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/norman/medium/en_US-norman-medium.onnx'
urllib.request.urlretrieve(url, base + '/en_US-norman-medium.onnx')
urllib.request.urlretrieve(url + '.json', base + '/en_US-norman-medium.onnx.json')
url = 'https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/ryan/high/en_US-ryan-high.onnx'
urllib.request.urlretrieve(url, base + '/en_US-ryan-high.onnx')
urllib.request.urlretrieve(url + '.json', base + '/en_US-ryan-high.onnx.json')
PYEOF
# ---------- Runtime ----------