Skip to content

Commit

Permalink
Bugfix: Illogical "Avoid computing higher temperatures on no_speech"
Browse files Browse the repository at this point in the history
Bugfix for openai#1279

It's "silence" when decoding has failed due to `compression_ratio_threshold` too, when further down the code it's not "silence" anymore.

"Silence" should be only when decoding has failed due to `logprob_threshold`.

Like described there:
https://github.com/openai/whisper/blob/8bc8860694949db53c42ba47ddc23786c2e02a8b/whisper/transcribe.py#L421

And in code there:
https://github.com/openai/whisper/blob/8bc8860694949db53c42ba47ddc23786c2e02a8b/whisper/transcribe.py#L243-L251
  • Loading branch information
Purfview committed Jan 4, 2024
1 parent ba3f3cd commit e7d46c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions whisper/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ 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 decode_result.avg_logprob < logprob_threshold
):
needs_fallback = False # silence
if not needs_fallback:
Expand Down

0 comments on commit e7d46c9

Please sign in to comment.