Avoid computing higher temperatures on no_speech segments (#225)
Port commit e334ff141d
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