Skip to content

Commit 6145a6f

Browse files
committed
Formatting
1 parent 90467ea commit 6145a6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/transformers/src/models/whisper/tokenization_whisper.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ export class WhisperTokenizer extends PreTrainedTokenizer {
204204
// but only if it wouldn't create an inverted range (end < start)
205205
if (chunk.words.length > 0 && chunk.timestamp[1] !== null) {
206206
for (const word of chunk.words) {
207-
if (word.timestamp[1] > chunk.timestamp[1] && chunk.timestamp[1] >= word.timestamp[0]) {
207+
if (
208+
word.timestamp[1] > chunk.timestamp[1] &&
209+
chunk.timestamp[1] >= word.timestamp[0]
210+
) {
208211
word.timestamp[1] = chunk.timestamp[1];
209212
}
210213
}

0 commit comments

Comments
 (0)