From: Georgi Gerganov Date: Sun, 22 Jan 2023 08:47:01 +0000 (+0200) Subject: whisper : fix condition for providing past prompt (critical) X-Git-Tag: upstream/1.7.4~1601 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=78f166174f126345ed87cc8f6941af1905c4a0f2;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp whisper : fix condition for providing past prompt (critical) This bug has been present since v1.1.0. Effectively, the past transcribed text wasn't being used for following transcriptions, which likely significantly reduces the transcription quality. Likely related to #419 --- diff --git a/whisper.cpp b/whisper.cpp index 6014cb18..81458a59 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -3449,7 +3449,7 @@ int whisper_full( prompt.clear(); // if we have already generated some text, use it as a prompt to condition the next generation - if (!prompt_past.empty() && t_cur > 0.5f) { + if (!prompt_past.empty() && t_cur < 0.5f) { int n_take = std::min(std::min(params.n_max_text_ctx, whisper_n_text_ctx(ctx)/2), int(prompt_past.size())); prompt = { whisper_token_prev(ctx) };