Repository navigation
Skip room-tone tail chunks; collapse punctuated repetition loops - #135
Merged
Merged
Conversation
Clips over 18 s are chunked, and the tail chunk after the talker stops is
room tone that passes the digital-silence check (abs 1e-5 RMS). Decoded,
it comes back as a memorized sentence ("The film was directed by the
director of the same name.") or a stray "the"/"ok": ~0.7 WER on the
served CommonVoice eval. `audible_chunks` empties a chunk whose loudest
100 ms frame is 30 dB under the clip's 95th-percentile frame. On the
cached eval clips noise-only chunks sat at <= -36 dB and speech chunks
at >= -17.5 dB; on the 9 clips where it fires, 8 lose the hallucinated
tail and none loses a real word.
`_truncate_repetitions` missed loops the model punctuates ("Yeah Yeah
Yeah. Yeah. Yeah,"). Punctuation is now ignored for runs of 6+; at 3-5
punctuated repeats are real speech ("No, no, no,"), and collapsing those
cost 40 errors over 47 rows. Replayed over all 53,755 served eval
predictions: 7 change, all loops, 124 -> 102 errors on those rows.
The chunking helpers move to asr_processing (stream_chunks to
diarization, beside pack_spans) to keep asr_pipeline under the
file-length cap.
Co-Authored-By: Claude Opus 5.5 <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.
Two inference-time fixes that came out of auditing the 2026-10-09 RunPod served eval (12 datasets × n=1000, plus full AMI / AMI-SDM / Loquacious / Earnings22 / GigaSpeech).
1. Quiet tail chunks hallucinate (
audible_chunks)Clips over 18 s are chunked (
chunk_bounds). The tail chunk after the talker stops is room tone, and room tone passesis_silent's absolute 1e-5 RMS check. Decoded, it comes back as a memorized sentence or a stray word:This costs about 0.7 WER on CommonVoice, which is the whole served-vs-local gap there (7.3 vs 6.6).
audible_chunksnow empties a chunk when its loudest 100 ms frame is more than 30 dB below the clip's 95th-percentile frame. The empty chunk then transcribes as "" and never reaches the model. A one-chunk clip is never emptied.Threshold, measured on the cached eval clips (
datasets_cache/eval_samples, every clip over 18 s in the first 3,000 rows of 9 datasets, 957 chunks):−30 dB leaves the wider margin on the speech side.
Real model run (MPS) on every clip where the gate fires:
Not fixed: tails that contain real background speech (e.g. Loquacious 2209, CV 66). A level gate can't tell that apart from the target speaker.
2. Punctuated repetition loops (
_truncate_repetitions)The old rule matched repeats exactly, so loops the model punctuates got through. Example: "Yeah Yeah Yeah … Yeah. Yeah. Yeah," in GigaSpeech.
My first version ignored punctuation at 3 or more repeats. That hurt: 3–5 punctuated repeats are real speech ("No, no, no,", "Practice, practice, practice."), and collapsing them cost 40 errors over 47 rows. So the original rule is unchanged, and a second, punctuation-insensitive pass collapses only runs of 6 or more.
Replayed over all 53,755 served eval predictions:
Refactor
The chunking helpers move to
asr_processing.py, andstream_chunksmoves todiarization.pynext topack_spans. This keepsasr_pipeline.pyunder the 600-line cap. Both files are already in the Hub bundle and insave_pretrained's copy list, and I checked that the flat-layout import works.Not in this PR
ta runpod deployplus aserve --forcerestart.!! DỊCHdecode corruption: 11 consecutive AMI rows in one batch, ~0.03 WER. Not reproduced, so no fix here.Test plan
🤖 Generated with Claude Code