Skip initial timestamp

This commit is contained in:
Bjarke Viksøe 2024-07-04 08:37:28 +02:00
parent 3e99276a27
commit 6c05cf7b0d

View File

@ -6241,14 +6241,13 @@ int whisper_full_with_state(
}
text = "";
t0 = t1;
while (i < (int) tokens_cur.size() && tokens_cur[i].id > whisper_token_beg(ctx)) {
while (i + 1 < (int) tokens_cur.size() && tokens_cur[i + 1].id > whisper_token_beg(ctx)) {
i++;
if (params.print_special) {
text += whisper_token_to_str(ctx, tokens_cur[i].id);
}
t0 = seek + 2 * (tokens_cur[i].tid - whisper_token_beg(ctx));
i++;
}
i--;
i0 = i + 1;
speaker_turn_next = false;
}