Avoid computing higher temperatures on no_speech segments (#225)

Port commit e334ff141d
This commit is contained in:
Guillaume Klein
2023-07-03 10:20:36 +02:00
committed by GitHub
parent 19c294f978
commit c0d93d0829

View File

@@ -649,6 +649,12 @@ class WhisperModel:
options.log_prob_threshold,
)
if (
options.no_speech_threshold is not None
and result.no_speech_prob > options.no_speech_threshold
):
needs_fallback = False # silence
if not needs_fallback:
break