Skip to content
Discussion options

You must be logged in to vote

To print out the tokens as they are being decode, you can add a line after and before this line:

  prev_token_len = tokens.shape[-1] #add this
  # expand the tokens tensor with the selected next tokens
  tokens, completed = self.decoder.update(tokens, logits, sum_logprobs)
  print(self.tokenizer.decode(tokens[0, prev_token_len:])) #add this

This does not print the timestamps, you'll need additional lines to decode the timestamps tokens separately.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@oenu
Comment options

Answer selected by oenu
Comment options

You must be logged in to vote
2 replies
@Disidente
Comment options

@Disidente
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants