Repository navigation
Conversation
…irst word is not clipped The VAD flags speech late (Silero: median about 70 ms, up to about 380 ms after the first audible sound) and BasePaddedVAD keeps one 32 ms window from before it. The piece the STT gets starts partway into the first word, and with hotwords Whisper turns the clipped word into one of them. The transcription controller now keeps the last windows of audio while no utterance is open, and puts them at the front of the next utterance's queue, marked as speech (WhisperSTT starts its buffer on a speech window), with their own times and speakers. The new utterance_preroll_seconds argument sets how much: 0.3 by default, 0 turns it off. No waiting is added: the audio has already arrived. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
amahpour
added a commit
to amahpour/switchboard
that referenced
this pull request
Nov 5, 2026
The pre-roll fix is now offered upstream as joinly-ai/joinly#188. Name it where the docs describe the fix, the way joinly-ai/joinly#187 is named for the Zoom fix: DEPLOY.md (the bot, Helm and Kubernetes sections), the meetings guide, DESIGN.md section 52, the change note and the self-test skill. The pinned fork commit and its sha256 are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 5, 2026
This branch has not been deployed
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.
The first word of an utterance is often clipped, and with
hotwordsset Whisper can turn the clipped word into a hotword.Problem.
BasePaddedVADkeeps one 32 ms window from before the first window the VAD calls speech, and Silero flags speech late. On a recorded Zoom call (24 lines, three Kokoro voices) it was a median of 73 ms after the first audible sound, p90 214 ms, max 378 ms. So the pieceWhisperSTTgets starts partway into the first word. With the room's names ashotwords, "Our upload page keeps failing on big files" came out as "Claude page keeps failing on big files" (the first hotword), and "Claude, what is the upload limit…" lost "Claude". It is not the model:large-v3-turbomakes the same mistake.Change.
DefaultTranscriptionControllerkeeps the last windows of non-speech audio while no utterance is open. When an utterance starts it puts them at the front of that utterance's window queue, marked as speech (WhisperSTT._buffer_windowsonly starts its buffer on a speech window), with their owntime_nsandspeaker. A new argument,utterance_preroll_seconds, sets how much: 0.3 by default (ten 32 ms windows), 0 turns it off.It is in the controller and not in
BasePaddedVADon purpose. Keeping k windows back in the VAD would delay every non-speech window, and so the end of every utterance, by k windows. The controller already has the audio, so nothing waits.utterance_start,last_speechandno_speech_eventstill come from the VAD's own windows, because the pre-roll goes straight into the queue.Measurement. The recording was replayed through the unmodified
SileroVAD,DefaultTranscriptionController._vad_workerandWhisperSTT._buffer_windows(base, 4 CPUs, 3 runs at four 8 ms offsets, to stand in for a live call's jitter). A line counts as right when switchboard's name matcher picks the agent that was called; delay is from the end of speech to the line's last piece being transcribed.utterance_preroll_seconds=0(as before)The replay with the argument at 0 cuts the same pieces as unmodified joinly (identical start, end and emit times at every offset).
Not covered. A piece that starts inside an utterance, after a pause shorter than
utterance_tail_seconds, still starts at the VAD's flag as before. That was 4 of 30 pieces in the recording, and a ring for them inWhisperSTT._buffer_windowschanged the words wrong from 3.5% to 3.3%, so it is not in this PR.Test.
tests/test_transcription_controller.pyruns the realBasePaddedVADand the controller over a scripted call, with an STT that records what it is given. It checks that an utterance starts with the audio before its speech, that those windows are marked as speech and keep their time and speaker, that nothing is added inside an utterance or repeated across two, that a short gap does not reach back into the last utterance, that 0 turns it off, and thatWhisperSTT._buffer_windowsstarts its first piece at the pre-roll. Seven of its twelve tests fail without the change.🤖 Generated with Claude Code