diff --git a/ai/Dockerfile b/ai/Dockerfile index bdd22c8..b6ed67d 100644 --- a/ai/Dockerfile +++ b/ai/Dockerfile @@ -44,13 +44,13 @@ RUN uv venv && \ # ---------- Télécharger la voix Piper Ryan ---------- RUN mkdir -p /opt/hermes/.venv/share/piper/voices && \ - /opt/hermes/.venv/bin/python3 -c " + /opt/hermes/.venv/bin/python3 /dev/stdin << 'PYEOF' && rm -f /tmp/dl_voice.py import urllib.request base = '/opt/hermes/.venv/share/piper/voices' url = 'https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/ryan/high/en_US-ryan-high.onnx' -urllib.request.urlretrieve(url + '?download=true', base + '/en_US-ryan-high.onnx') -urllib.request.urlretrieve(url + '.onnx.json?download=true', base + '/en_US-ryan-high.onnx.json') -" +urllib.request.urlretrieve(url, base + '/en_US-ryan-high.onnx') +urllib.request.urlretrieve(url + '.json', base + '/en_US-ryan-high.onnx.json') +PYEOF # ---------- Patch tts_tool.py: replace Edge TTS fallback with Piper ---------- COPY ai/patch_tts_tool.py /tmp/patch_tts_tool.py