Skip to content

Commit

Permalink
Make batched suppress_tokens behaviour same as in sequential (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
Purfview authored Dec 11, 2024
1 parent 8327d8c commit f32c0e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion faster_whisper/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,11 @@ def transcribe(
initial_prompt=initial_prompt,
prefix=prefix,
suppress_blank=suppress_blank,
suppress_tokens=get_suppressed_tokens(tokenizer, suppress_tokens),
suppress_tokens=(
get_suppressed_tokens(tokenizer, suppress_tokens)
if suppress_tokens
else suppress_tokens
),
prepend_punctuations=prepend_punctuations,
append_punctuations=append_punctuations,
max_new_tokens=max_new_tokens,
Expand Down

0 comments on commit f32c0e8

Please sign in to comment.