mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-18 20:27:53 +00:00
Skip initial timestamp
This commit is contained in:
parent
3e99276a27
commit
6c05cf7b0d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user