Make Piper's synthesis path configurable (TTS_PATH)
piper-tts 1.6.0 moved synthesis from POST / to POST /synthesize, with an identical request body; the VPS sidecars run 1.6.0 and returned 405 to every read-aloud request, while millenia's older server still expects /. Rather than pinning both deployments to one Piper release, the path is configuration -- default "/" keeps millenia working untouched, and the compose stack sets /synthesize. The container healthcheck moves with it, since it was probing the old route too.
This commit is contained in:
@@ -30,7 +30,7 @@ EXPOSE 5000
|
||||
# the honest check: it proves the model loaded, not just that a port is open.
|
||||
HEALTHCHECK --interval=60s --timeout=20s --start-period=180s --retries=3 \
|
||||
CMD python -c "import os,urllib.request,json; \
|
||||
urllib.request.urlopen(urllib.request.Request('http://127.0.0.1:'+os.environ['PIPER_PORT']+'/', \
|
||||
urllib.request.urlopen(urllib.request.Request('http://127.0.0.1:'+os.environ['PIPER_PORT']+'/synthesize', \
|
||||
data=json.dumps({'text':'ok','voice':os.environ['PIPER_VOICE']}).encode(), \
|
||||
headers={'Content-Type':'application/json'}), timeout=15).read(1)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user