Closed Josscii closed 1 week ago
I do transcribe with turbo
model, and it sometimes crash on this line
@ggerganov
Thanks for finding this. Would you like to submit a PR?
I can submit a pr, but I'm don't have a good understanding of the code, I only debuged it here, I'm afraid I would break some code
The fix is correct. ns
is the number of samples, while the j
iterator loops over the tokens, not the samples. This check is needed to guarantee that we don't do out-of-bounds access in the tokens
array.
Thanks for your explaination, I'll submit a pr
https://github.com/ggerganov/whisper.cpp/blob/a5abfe6a90495f7bf19fe70d016ecc255e97359c/src/whisper.cpp#L7022
j
is compared withns
, which seems wrong, it should less thann
, notns
.