Higgs Audio v3: condition on a tail-prepared reference to stop end-of-clip hiss - #14563
Merged
Merged
Conversation
…-clip hiss After the codec-side fix (audio.cpp #454, SE PR #14546) Higgs clips still ended in a rising broadband hiss in roughly half of all generations. Decoding identical seeded codes with 8 or 64 frames of tail context gave the same samples, and holding the final frame's codes decoded to a steady hiss at the same level, so the noise is in the codes the language model emits, not in the codec. What decides it is the reference WAV: the model ends its clip the way the reference ends. References cut mid-noise or ending in room tone gave hissy endings; references ending in silence gave clean ones. Speak now conditions on a cached copy of the reference whose tail is trimmed at the pipeline's peak-relative threshold, faded out over 50 ms and followed by 400 ms of digital silence (CloneReferenceTail, prepared/<name>.wav next to the voice, keyed on size + mtime + recipe version). On 48 seeded clips per treatment the median level of the last four frames went from -46 dBFS to -64 dBFS and loud endings from 18 to 3, with no runaway generations in 192 requests. Preparation is best-effort and falls back to the file as is. Also retries once when audio.cpp reports "reached max_tokens before EOC" (one runaway in ~370 requests; no seed is sent so the retry samples afresh). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #14546 and the "end noises" still heard after it (also the 60 % estimate in #14480 comment).
What the re-test found
Re-tested on the shipped 2026-09-05 audio.cpp build (Metal, Q8_0) with an instrumented local build of the same commit:
Sophie_Anderson.wavends at -19 dBFS mid-noise and every clip from it ended hissy;female_06.wavends at -83 dBFS and its clips ended clean.Fix
CloneReferenceTail.PrepareAsyncmakes a cached copy of the reference (voices/prepared/<name>.wav, keyed on size + mtime + recipe version): trailing silence/noise trimmed at the pipeline's peak-relative threshold, 50 ms fade-out, 400 ms of digital silence appended, 24 kHz mono. HiggsSpeakconditions on that copy; the transcript is still read from the original's.txt. Falls back to the original when ffmpeg is missing or fails.Seeded A/B, 48 clips per treatment (4 voices × 12 seeds, same seeds per column), level of the loudest of the last four codec frames:
No runaway generations in 192 prepared-reference requests. The remaining loud endings are Morgan Freeman's clip, whose own room tone the model copies. Pad without fade was rejected: an abrupt cut followed by silence made the model emit one loud burst before its silence.
Also retries once on audio.cpp's
Higgs TTS generation reached max_tokens before EOC(one in ~370 requests observed; no seed is sent so the retry samples afresh), which previously failed the segment outright.Tests
CloneReferenceTail: prepared path, stamp, cache reuse, missing-reference fallback, runaway-error matcher.🤖 Generated with Claude Code