Skip to content

Commit

Permalink
Fix broken prompt_reset_on_temperature (#604)
Browse files Browse the repository at this point in the history
* Fix broken prompt_reset_on_temperature

Fixing: SYSTRAN/faster-whisper#603

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

Regression since PR356 -> SYSTRAN/faster-whisper#356
  • Loading branch information
AIXerum committed Dec 13, 2023
1 parent 8a58422 commit 57cbea9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions faster_whisper/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,13 @@ def generate_with_fallback(
decode_result = max(
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

Expand Down

0 comments on commit 57cbea9

Please sign in to comment.