diff --git a/src/whisper/transcribe.py b/src/whisper/transcribe.py index 05e71003e..a6b68163c 100644 --- a/src/whisper/transcribe.py +++ b/src/whisper/transcribe.py @@ -219,6 +219,8 @@ def decode_with_fallback(segment: torch.Tensor) -> DecodingResult: if ( no_speech_threshold is not None and decode_result.no_speech_prob > no_speech_threshold + and logprob_threshold is not None + and decode_result.avg_logprob < logprob_threshold ): needs_fallback = False # silence if not needs_fallback: