fix(stt): thread confidence thresholds into faster-whisper's own gate (salvage #74193) - #77516
Merged
kshitijk4poor merged 1 commit intoAug 3, 2026
Conversation
…NousResearch#74178) build_local_transcribe_kwargs read stt.local.no_speech_prob_threshold / stt.local.logprob_threshold only for Hermes' post-filter (_is_hallucinated_segment). faster-whisper's model.transcribe() never received them, so its internal defaults (no_speech_threshold=0.6, log_prob_threshold=-1.0) always applied and silently dropped low-confidence segments before they reached the post-filter — making those config knobs dead for the first gate. Non-English speech decodes at a lower avg_logprob, so the English-tuned defaults discard whole utterances (empty transcript despite correct capture and language detection). Map the same config values through to model.transcribe() so both gates stay in sync and the knobs work. Defaults are unchanged, so behavior is identical unless a user tunes them. Fixes NousResearch#74178
kshitijk4poor
enabled auto-merge (rebase)
August 3, 2026 08:52
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.
Salvages #74193 by @PRATHAMESH75 — commit cherry-picked to preserve authorship, rebased onto current main (the original's stale-base fork CI cannot satisfy current required checks). Fixes #74178.
Context — what this fixes, for whom
Anyone using local STT (faster-whisper) with non-English speech or tuned confidence thresholds: the
stt.local.no_speech_prob_thresholdandstt.local.logprob_thresholdconfig knobs only fed the POST-transcription hallucination filter, while faster-whisper's own internal gate ran first with hardcoded defaults (0.6 / -1.0) and silently dropped low-confidence segments — non-English speech decodes at lower avg_logprob, so the config knobs were dead exactly where they mattered.What the fix does (kept verbatim)
Threads both config values into
model.transcribe()via faster-whisper's documentedno_speech_threshold/log_prob_thresholdkwargs, reusing the existing_confidence_thresholds()helper. Defaults unchanged — behavior is identical unless a user tunes the knobs. Verified against faster-whisper's own source that both kwargs gate segment retention exactly as the PR claims.Verification
tests/tools/test_stt_silence_hallucinations.py: 11 passed on current main (incl. the PR's 4 wiring tests: defaults, configurable, garbage fallback, kwargs-reach-model)tools/transcription_tools.pyto main → 4 tests fail; restore → 11 passbuild_local_transcribe_kwargsstill omits both kwargsCloses #74193 (superseded by this salvage — original author credited via cherry-pick authorship).