Skip to content

Commit

Permalink
whisper : fix index overflow in token-level timestamp logic (ggergano…
Browse files Browse the repository at this point in the history
  • Loading branch information
Josscii authored and adutilleul committed Nov 16, 2024
1 parent 861ea09 commit 42f9132
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/whisper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7019,7 +7019,7 @@ static void whisper_exp_compute_token_level_timestamps(
k++;
}
tokens[j].t1 = sample_to_timestamp(k);
if (j < ns - 1 && tokens[j].t1 > tokens[j + 1].t0) {
if (j < n - 1 && tokens[j].t1 > tokens[j + 1].t0) {
tokens[j].t1 = tokens[j + 1].t0;
} else {
s1 = k;
Expand Down

0 comments on commit 42f9132

Please sign in to comment.