Avoid computing higher temperatures on no_speech segments (#225)
Port commit https://github.com/openai/whisper/commit/e334ff141d5444fbf6904edaaf408e5b0b416fe8
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user