mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-08 11:54:40 +00:00
Merge 6c05cf7b0dd83cc90b9f4f86c80f4c9d22e3c5c3 into ada745f4a5af9a5e237fda9ca402b4b73919bdde
This commit is contained in:
commit
e62ee0ea46
@ -6313,11 +6313,14 @@ int whisper_full_with_state(
|
||||
}
|
||||
}
|
||||
text = "";
|
||||
while (i < (int) tokens_cur.size() && tokens_cur[i].id > whisper_token_beg(ctx)) {
|
||||
i++;
|
||||
}
|
||||
i--;
|
||||
t0 = t1;
|
||||
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));
|
||||
}
|
||||
i0 = i + 1;
|
||||
speaker_turn_next = false;
|
||||
}
|
||||
@ -6334,8 +6337,8 @@ int whisper_full_with_state(
|
||||
printf("[%s --> %s] %s\n", to_timestamp(tt0).c_str(), to_timestamp(tt1).c_str(), text.c_str());
|
||||
} else {
|
||||
printf("%s", text.c_str());
|
||||
fflush(stdout);
|
||||
}
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
result_all.push_back({ tt0, tt1, text, state->no_speech_prob, {}, speaker_turn_next });
|
||||
|
Loading…
x
Reference in New Issue
Block a user