Fix broken prompt_reset_on_temperature (#604)

* Fix broken prompt_reset_on_temperature

Fixing: https://github.com/SYSTRAN/faster-whisper/issues/603

Broken because `generate_with_fallback()` doesn't return final temperature.

Regression since PR356 -> https://github.com/SYSTRAN/faster-whisper/pull/356
This commit is contained in:
Purfview
2023-12-13 12:14:39 +00:00
committed by GitHub
parent 19329a3611
commit ebcfd6b964

View File

@@ -731,6 +731,13 @@ class WhisperModel:
decode_result = max( decode_result = max(
below_cr_threshold_results or all_results, key=lambda x: x[1] below_cr_threshold_results or all_results, key=lambda x: x[1]
) )
# to pass final temperature for prompt_reset_on_temperature
decode_result = (
decode_result[0],
decode_result[1],
temperature,
decode_result[3],
)
return decode_result return decode_result