fix(fish-s2): reference_id was a silent no-op — populate per-voice dirs + guard the regression

reference_id=<name> resolves against the DIRECTORY references/<name>/
(audio + same-basename .lab), not a flat references/<name>.wav. Voices
were staged flat with the per-name dirs left empty, so every
reference_id resolved to nothing and Fish fell back to its default
speaker — every dropdown voice produced byte-identical audio (proven:
Abigail == Imogen == no-ref, same text+seed). This was the real "no
accent" root cause, independent of the asset-engine "undefined" select
bug.

Server fix (applied to irv-ml1): populated references/<name>/<name>.wav
+ <name>.lab for all 32 voices; re-test confirms Imogen/Eleanor/
Beatrice/Abigail/no-ref now all distinct.

Durable hardening + record correction:
- playbook: normalize-layout step (flat <name>.wav -> nested dir, cp -u
  idempotent, when-gated on count mismatch) + an A/B verify gate that
  hard-fails the deploy if two reference_ids yield identical output.
- services.yaml: correct the reference_id resolution doc (dir + .lab,
  not flat wav).
- README + persistent-memory: correct the "reference_id-by-name is THE
  working path, verified" claim — it was a no-op until this fix; the
  prior ECAPA 0.79 result came through the inline base64 path.
This commit is contained in:
vh
2026-06-01 16:42:30 -07:00
parent 3b54519d60
commit c5bbb90980
4 changed files with 100 additions and 26 deletions
+16 -4
View File
@@ -94,10 +94,22 @@ root path; there's no `/openapi.json` endpoint exposed directly.
## Voice library
Drop reference WAV / MP3 / FLAC into
`/worktank/fish-s2/references/` on the host. The wrapper scans on
request — no restart needed. Use clean ~5-15 s clips, single
speaker, ideally with diverse intonation samples.
Named voices are selected via the `reference_id` field, which Fish
resolves against the **directory** `references/<name>/` — NOT a flat
`references/<name>.wav`. Stage each voice as:
```
/worktank/fish-s2/references/<name>/<name>.wav # clean ~5-15 s, single speaker
/worktank/fish-s2/references/<name>/<name>.lab # transcript of that clip
```
A flat `references/<name>.wav` (or an empty `references/<name>/` dir)
is **silently ignored** — `reference_id` resolves to nothing and Fish
falls back to its default speaker, so every voice sounds identical.
This was the 2026-06-01 "no accent" root cause; the deploy playbook now
carries a normalize-layout step + an A/B smoke gate (`reference_id`
MUST change the output) to keep it from regressing. The wrapper scans
on request — no restart needed after adding a voice.
## Deploy