We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90467ea commit 6145a6fCopy full SHA for 6145a6f
packages/transformers/src/models/whisper/tokenization_whisper.js
@@ -204,7 +204,10 @@ export class WhisperTokenizer extends PreTrainedTokenizer {
204
// but only if it wouldn't create an inverted range (end < start)
205
if (chunk.words.length > 0 && chunk.timestamp[1] !== null) {
206
for (const word of chunk.words) {
207
- if (word.timestamp[1] > chunk.timestamp[1] && chunk.timestamp[1] >= word.timestamp[0]) {
+ if (
208
+ word.timestamp[1] > chunk.timestamp[1] &&
209
+ chunk.timestamp[1] >= word.timestamp[0]
210
+ ) {
211
word.timestamp[1] = chunk.timestamp[1];
212
}
213
0 commit comments