Skip to content

Commit

Permalink
fix token suppression (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
VulumeCode authored Sep 26, 2022
1 parent ead77fa commit 520796a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions whisper/decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,7 @@ def _get_suppress_tokens(self) -> Tuple[int]:
elif suppress_tokens is None or len(suppress_tokens) == 0:
suppress_tokens = [] # interpret empty string as an empty list
else:
assert isinstance(self.options.suppress_tokens, list), "suppress_tokens must be a list"
suppress_tokens = self.options.suppress_tokens
assert isinstance(suppress_tokens, list), "suppress_tokens must be a list"

suppress_tokens.extend(
[self.tokenizer.sot, self.tokenizer.sot_prev, self.tokenizer.sot_lm]
Expand Down

0 comments on commit 520796a

Please sign in to comment.