Skip to content

Commit

Permalink
Update tokenizers.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindMahadevan authored Jun 14, 2024
1 parent e6e7e93 commit 03b2c40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tokenizers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3613,8 +3613,8 @@ export class WhisperTokenizer extends PreTrainedTokenizer {
// Whisper timestamp tokens start from 0.00 and go to timestamp 30.00 in 0.02 increments.
// We can calculate the last time stamp token as timestamp_begin plus the number of tokens
// tokens from 0.00 to 30.00 which is 1500.
const total_timestamp_tokens = (30.00 - 0.00) / 0.02
const timestamp_end = timestamp_begin + total_timestamp_tokens
const total_timestamp_tokens = (30.00 - 0.00) / 0.02;
const timestamp_end = timestamp_begin + total_timestamp_tokens;

let previous_tokens = [];
let previous_token_timestamps = [];
Expand Down

0 comments on commit 03b2c40

Please sign in to comment.