Avoid computing higher temperatures on no_speech segments (#225)

Port commit https://github.com/openai/whisper/commit/e334ff141d5444fbf6904edaaf408e5b0b416fe8
This commit is contained in:
Guillaume Klein
2023-07-03 10:20:36 +02:00
committed by GitHub
parent 19c294f978
commit c0d93d0829
+6
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