mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 04:37:51 +00:00
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
This commit is contained in:
parent
21c569ba4a
commit
78f166174f
@ -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) };
|
||||
|
Loading…
Reference in New Issue
Block a user