fish-s2: docs + verify reflect actual API (POST /v1/tts, not OpenAI-compat)

After getting fish-s2 finally healthy on attempt #5, the playbook's
verify still failed because /v1/audio/voices doesn't exist. Discovery:
the Fish wrapper has a custom API surface, not OpenAI-compatible.
Real endpoints:

  POST /v1/tts             — synthesis (text body, optional `references`
                             field for voice cloning, returns audio/wav)
  GET  /v1/health          — liveness (used by Docker healthcheck)
  GET  /heartbeat          — alternate liveness signal
  GET  /                   — Swagger Editor UI for the OpenAPI spec

No /v1/audio/speech, /v1/audio/voices, /v1/models — those return 404.

Updated:
* Playbook verify — replaced the JSON-shape /v1/audio/voices check
  with a POST /v1/tts smoke that asserts a real RIFF WAV comes back.
* README API section — replaced the OpenAI-compat examples with
  Fish's actual {"text":"...","references":[...]} body shape.
* README disk footprint — corrected ~9 GB → ~11 GB (codec.pth was
  larger than I estimated; 1.9 GB + 9 GB safetensors).
* README Lessons learned section — recorded the 5-iteration deploy
  story so the next time we touch a Fish-style upstream we don't
  re-walk the dockerfile / target / pre-pull / API-shape traps.
This commit is contained in:
vh
2026-04-27 23:28:02 -07:00
parent 43c7c08673
commit 01c1ae2605
2 changed files with 62 additions and 16 deletions
+13 -3
View File
@@ -103,10 +103,20 @@ verify:
shell: curl -sf -o /dev/null http://localhost:{{ host_port }}/v1/health
changed_when: "false"
- name: /v1/audio/voices returns valid JSON
- name: /v1/tts returns a real WAV (POST with text body)
# Fish's API is NOT OpenAI-compatible — there's no /v1/audio/speech
# and no /v1/audio/voices. The single TTS endpoint is POST /v1/tts
# with at minimum {"text":"..."} returning audio/wav. Voice cloning
# is via reference= field in the body (paths under /app/references).
# Verify by POST + asserting the response is a real RIFF WAV.
shell: |
curl -sf http://localhost:{{ host_port }}/v1/audio/voices \
| python3 -c "import json,sys; json.load(sys.stdin)"
out=$(mktemp --suffix=.wav)
curl -sf -X POST http://localhost:{{ host_port }}/v1/tts \
-H 'Content-Type: application/json' \
-d '{"text":"Verify."}' \
-o "$out" --max-time 30
file -b "$out" | grep -q '^RIFF.*WAVE'
rm -f "$out"
changed_when: "false"
- name: Container is running