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:
@@ -749,10 +749,15 @@ services:
|
|||||||
Eleanor (p228), Beatrice (p229) — consenting VCTK volunteers (CC BY
|
Eleanor (p228), Beatrice (p229) — consenting VCTK volunteers (CC BY
|
||||||
4.0), NOT modeled on or representing any public figure. Other female:
|
4.0), NOT modeled on or representing any public figure. Other female:
|
||||||
Abigail, Alice, Cora, Elena, Emily, Gianna, Jade, Layla, Olivia,
|
Abigail, Alice, Cora, Elena, Emily, Gianna, Jade, Layla, Olivia,
|
||||||
glados. Resolves to <name>.wav + optional <name>.txt transcript;
|
glados. Resolves against the DIRECTORY references/<name>/ (audio +
|
||||||
blank = model default/random speaker. To add: drop a clean 5–15s WAV
|
a same-basename <name>.lab transcript inside it) — NOT a flat
|
||||||
into the references dir + add the name here. (No /voices API → static
|
references/<name>.wav, which fish-speech ignores (empty/flat-only
|
||||||
list; a list-endpoint is the durable fix — see notes.)
|
dirs silently collapse every voice to the model default; root-caused
|
||||||
|
+ fixed 2026-06-01). Blank = model default/random speaker. To add:
|
||||||
|
create references/<name>/ with <name>.wav (clean 5–15s) + <name>.lab
|
||||||
|
(transcript) and add the name here; the deploy playbook's normalize
|
||||||
|
step also mirrors any flat <name>.wav into this layout. (No /voices
|
||||||
|
API → static list; a list-endpoint is the durable fix — see notes.)
|
||||||
- name: references
|
- name: references
|
||||||
type: json
|
type: json
|
||||||
label: Custom clone (inline base64)
|
label: Custom clone (inline base64)
|
||||||
|
|||||||
+33
-15
@@ -118,16 +118,30 @@ _As of 2026-06-01:_
|
|||||||
`01KT2K2SY9N7AY69R9V0B4RXSW` → asset-engine-dev). **Workaround until fixed:
|
`01KT2K2SY9N7AY69R9V0B4RXSW` → asset-engine-dev). **Workaround until fixed:
|
||||||
click the dropdown (fires change) or hit the API directly.** My half
|
click the dropdown (fires change) or hit the API directly.** My half
|
||||||
(`blendable: false` catalog flag) is queued — see Recent decisions.
|
(`blendable: false` catalog flag) is queued — see Recent decisions.
|
||||||
- **Fish cloning RESOLVED — it clones competently; "not British" was the
|
- **Fish "not British" had TWO independent root causes — BOTH now fixed.**
|
||||||
undefined bug.** ECAPA-TDNN re-test (2026-06-01): an Imogen-referenced Fish
|
The ECAPA-TDNN re-test (2026-06-01) showed Fish's cloning *engine* works: an
|
||||||
clone scores **~0.79 cosine vs the real `Imogen.wav`** (firmly same-speaker)
|
Imogen reference scores **~0.79 cosine vs real `Imogen.wav`** vs **~0.10 vs
|
||||||
and only **~0.10 vs Fish's no-reference default voice**. So Fish faithfully
|
the no-reference default** — but that test fed the reference via the inline
|
||||||
clones Imogen WHEN it receives the reference. The operator's "Imogen doesn't
|
base64 `references` path, which masked the real defect. **`reference_id`-by-
|
||||||
sound British at all" was the `"undefined"` select bug feeding Fish its
|
name (the path the catalog + form actually use) was silently a NO-OP.** Proof
|
||||||
DEFAULT voice (≈ a different speaker), NOT a Fish cloning failure. Earlier
|
(2026-06-01): `reference_id=Abigail`, `=Imogen`, and no-reference all returned
|
||||||
resemblyzer-based "weak cloner" verdict RETRACTED. No Fish-side fix needed —
|
**byte-identical** audio (md5 `40b6ac73…`, same text+seed) → reference_id was
|
||||||
the blocker is entirely the undefined bug (asset-engine-dev). Future voice
|
being ignored entirely, so every dropdown voice collapsed to Fish's default
|
||||||
clones operator-handled (pitch-shift deepening abandoned).
|
speaker. Cause: fish-speech resolves `reference_id=<name>` against the
|
||||||
|
**directory** `references/<name>/` (audio + same-basename `.lab`), but the
|
||||||
|
voices were staged as **flat** `references/<name>.wav` + `.txt` with the
|
||||||
|
per-name dirs left **empty** → nothing resolved. **FIX (2026-06-01):**
|
||||||
|
populated `references/<name>/<name>.wav` + `<name>.lab` for all 32 voices;
|
||||||
|
re-test → Imogen/Eleanor/Beatrice/Abigail/no-ref all 5 **distinct**.
|
||||||
|
reference_id now works; British accents come through. Hardened: the
|
||||||
|
deploy playbook gained a normalize-layout step + an A/B smoke gate
|
||||||
|
(`reference_id` MUST change output) so the empty-dir regression can't ship
|
||||||
|
silently. So the "not British" saga was (A) the `"undefined"` select bug
|
||||||
|
(asset-engine, still belt-and-suspenders) AND (B) this reference_id no-op
|
||||||
|
(server-side, FIXED) — B alone would have kept every voice identical even
|
||||||
|
with A fixed. Earlier "reference_id-by-name is THE working path, verified"
|
||||||
|
claim RETRACTED. Pitch-shift deepening abandoned; future clones operator-
|
||||||
|
handled.
|
||||||
- **On-host consented voice library** — ~992 real-person clips cached in the
|
- **On-host consented voice library** — ~992 real-person clips cached in the
|
||||||
kyutai tts-voices repo (`/worktank/kyutai-tts/.../snapshots/.../`): VCTK
|
kyutai tts-voices repo (`/worktank/kyutai-tts/.../snapshots/.../`): VCTK
|
||||||
(CC BY 4.0, accent-tagged speaker IDs), Unmute voice-donations (CC0), EARS +
|
(CC BY 4.0, accent-tagged speaker IDs), Unmute voice-donations (CC0), EARS +
|
||||||
@@ -182,8 +196,11 @@ _As of 2026-06-01:_
|
|||||||
- `[2026-06-01]` **Fish-S2 catalog v1→v6** (`f3c260e`..`38d9e3b`) — was a
|
- `[2026-06-01]` **Fish-S2 catalog v1→v6** (`f3c260e`..`38d9e3b`) — was a
|
||||||
blank 2-field form; now exposes the full fish-speech ServeTTSRequest surface
|
blank 2-field form; now exposes the full fish-speech ServeTTSRequest surface
|
||||||
+ a 32-voice `reference_id` "Voice" dropdown (STATIC list — Fish has no
|
+ a 32-voice `reference_id` "Voice" dropdown (STATIC list — Fish has no
|
||||||
/voices API). `reference_id`-by-name is the WORKING clone path; the
|
/voices API). `reference_id`-by-name works ONLY when each voice is staged as
|
||||||
path-form `references` shape 500s (see Tried and abandoned). Corrected vram
|
a `references/<name>/` dir with `<name>.wav` + `<name>.lab` — was silently a
|
||||||
|
no-op until that layout fix on 2026-06-01 (see the two-root-causes entry
|
||||||
|
above); the inline-path-as-filesystem-path `references` shape 500s (see Tried
|
||||||
|
and abandoned). Corrected vram
|
||||||
4→24 GB, cold_start 8→240s, seedable false→true. Added 3 consenting
|
4→24 GB, cold_start 8→240s, seedable false→true. Added 3 consenting
|
||||||
British-female VCTK voices (Imogen=p225/Eleanor=p228/Beatrice=p229).
|
British-female VCTK voices (Imogen=p225/Eleanor=p228/Beatrice=p229).
|
||||||
|
|
||||||
@@ -256,9 +273,10 @@ _25 older entries archived to archival-memory.md._
|
|||||||
|
|
||||||
- `[2026-06-01]` **Fish path-form references** (`{audio:"/app/references/x.wav"}`)
|
- `[2026-06-01]` **Fish path-form references** (`{audio:"/app/references/x.wav"}`)
|
||||||
→ HTTP 500 on this build, despite the stack README showing that shape. The
|
→ HTTP 500 on this build, despite the stack README showing that shape. The
|
||||||
working clone paths are `reference_id` (by name → reads `<name>.wav` +
|
working clone paths are `reference_id` (by name → resolves the DIRECTORY
|
||||||
optional `<name>.txt`) or inline base64 `references`. The catalog now uses
|
`references/<name>/` containing `<name>.wav` + `<name>.lab`; the flat
|
||||||
`reference_id`.
|
`references/<name>.wav` is ignored — see the two-root-causes entry above) or
|
||||||
|
inline base64 `references`. The catalog uses `reference_id`.
|
||||||
|
|
||||||
- `[2026-06-01]` **Reference transcript barely affects Fish clone IDENTITY**
|
- `[2026-06-01]` **Reference transcript barely affects Fish clone IDENTITY**
|
||||||
(disproving my mid-session theory). I'd blamed a bogus provenance-note `.txt`
|
(disproving my mid-session theory). I'd blamed a bogus provenance-note `.txt`
|
||||||
|
|||||||
@@ -36,6 +36,27 @@ steps:
|
|||||||
shell: mkdir -p {{ references_dir }}
|
shell: mkdir -p {{ references_dir }}
|
||||||
creates: "{{ references_dir }}"
|
creates: "{{ references_dir }}"
|
||||||
|
|
||||||
|
- name: Normalize reference layout (flat <name>.wav → <name>/<name>.wav + .lab)
|
||||||
|
# fish-speech resolves reference_id=<name> against the DIRECTORY
|
||||||
|
# references/<name>/ (audio + a same-basename .lab transcript), NOT a
|
||||||
|
# flat references/<name>.wav. A flat-only layout makes every
|
||||||
|
# reference_id silently resolve to nothing → Fish falls back to its
|
||||||
|
# default speaker, so every voice in the dropdown sounds identical
|
||||||
|
# (this was the 2026-06-01 "no accent" root cause). External voice
|
||||||
|
# imports drop flat <name>.wav + <name>.txt here; this step mirrors
|
||||||
|
# each into references/<name>/<name>.wav + <name>/<name>.lab. `cp -u`
|
||||||
|
# makes it idempotent; the `when:` skips it once every flat wav has a
|
||||||
|
# matching nested wav (audio-only voices like glados need no .lab).
|
||||||
|
shell: |
|
||||||
|
cd {{ references_dir }} || exit 1
|
||||||
|
for w in *.wav; do
|
||||||
|
[ -e "$w" ] || continue
|
||||||
|
n="${w%.wav}"; mkdir -p "$n"
|
||||||
|
cp -u "$w" "$n/$n.wav"
|
||||||
|
[ -e "$n.txt" ] && cp -u "$n.txt" "$n/$n.lab" || true
|
||||||
|
done
|
||||||
|
when: "[ \"$(cd {{ references_dir }} 2>/dev/null && ls *.wav 2>/dev/null | wc -l)\" -ne \"$(cd {{ references_dir }} 2>/dev/null && ls */*.wav 2>/dev/null | wc -l)\" ]"
|
||||||
|
|
||||||
- name: Ensure checkpoints dir exists
|
- name: Ensure checkpoints dir exists
|
||||||
shell: mkdir -p {{ checkpoints_dir }}
|
shell: mkdir -p {{ checkpoints_dir }}
|
||||||
creates: "{{ checkpoints_dir }}"
|
creates: "{{ checkpoints_dir }}"
|
||||||
@@ -106,9 +127,10 @@ verify:
|
|||||||
- name: /v1/tts returns a real WAV (POST with text body)
|
- name: /v1/tts returns a real WAV (POST with text body)
|
||||||
# Fish's API is NOT OpenAI-compatible — there's no /v1/audio/speech
|
# 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
|
# and no /v1/audio/voices. The single TTS endpoint is POST /v1/tts
|
||||||
# with at minimum {"text":"..."} returning audio/wav. Voice cloning
|
# with at minimum {"text":"..."} returning audio/wav. Named-voice
|
||||||
# is via reference= field in the body (paths under /app/references).
|
# cloning is via the reference_id field, which resolves against the
|
||||||
# Verify by POST + asserting the response is a real RIFF WAV.
|
# references/<name>/ directory (audio + .lab) — see the A/B gate
|
||||||
|
# below. Verify by POST + asserting the response is a real RIFF WAV.
|
||||||
shell: |
|
shell: |
|
||||||
out=$(mktemp --suffix=.wav)
|
out=$(mktemp --suffix=.wav)
|
||||||
curl -sf -X POST http://localhost:{{ host_port }}/v1/tts \
|
curl -sf -X POST http://localhost:{{ host_port }}/v1/tts \
|
||||||
@@ -119,6 +141,23 @@ verify:
|
|||||||
rm -f "$out"
|
rm -f "$out"
|
||||||
changed_when: "false"
|
changed_when: "false"
|
||||||
|
|
||||||
|
- name: reference_id actually changes the voice (A/B — guards the empty-dir regression)
|
||||||
|
# Two different reference_ids with identical text+seed MUST yield
|
||||||
|
# different audio. If byte-identical, reference_id is being ignored
|
||||||
|
# (empty references/<id>/ dirs) and every voice has silently
|
||||||
|
# collapsed to Fish's default speaker — the 2026-06-01 root cause.
|
||||||
|
# Hard-fail the deploy so the regression can never ship silently.
|
||||||
|
shell: |
|
||||||
|
a=$(mktemp); b=$(mktemp)
|
||||||
|
curl -sf -X POST http://localhost:{{ host_port }}/v1/tts -H 'Content-Type: application/json' \
|
||||||
|
-d '{"text":"The quick brown fox.","seed":42,"reference_id":"Abigail"}' -o "$a" --max-time 60
|
||||||
|
curl -sf -X POST http://localhost:{{ host_port }}/v1/tts -H 'Content-Type: application/json' \
|
||||||
|
-d '{"text":"The quick brown fox.","seed":42,"reference_id":"Imogen"}' -o "$b" --max-time 60
|
||||||
|
rc=0; [ "$(md5sum < "$a")" = "$(md5sum < "$b")" ] && rc=1
|
||||||
|
rm -f "$a" "$b"
|
||||||
|
exit $rc
|
||||||
|
changed_when: "false"
|
||||||
|
|
||||||
- name: Container is running
|
- name: Container is running
|
||||||
shell: docker inspect fish-s2 --format '{{.State.Status}}' | grep -q running
|
shell: docker inspect fish-s2 --format '{{.State.Status}}' | grep -q running
|
||||||
changed_when: "false"
|
changed_when: "false"
|
||||||
|
|||||||
@@ -94,10 +94,22 @@ root path; there's no `/openapi.json` endpoint exposed directly.
|
|||||||
|
|
||||||
## Voice library
|
## Voice library
|
||||||
|
|
||||||
Drop reference WAV / MP3 / FLAC into
|
Named voices are selected via the `reference_id` field, which Fish
|
||||||
`/worktank/fish-s2/references/` on the host. The wrapper scans on
|
resolves against the **directory** `references/<name>/` — NOT a flat
|
||||||
request — no restart needed. Use clean ~5-15 s clips, single
|
`references/<name>.wav`. Stage each voice as:
|
||||||
speaker, ideally with diverse intonation samples.
|
|
||||||
|
```
|
||||||
|
/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
|
## Deploy
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user