You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tokenizer = WhisperTokenizer.from_pretrained(model_path, language="Polish", task="transcribe")
suppress = [token for c in "0123456789" for token in tokenizer.encode(c)]
for result in whisper_asr(KeyDataset(dataset, "audio"),
return_timestamps="word",
chunk_length_s=30,
generate_kwargs={'language': 'polish', 'suppress_tokens': [-1] + suppress}):
Inference (fast as expected on GPU)
for result in whisper_asr(KeyDataset(dataset, "audio"),
return_timestamps="word",
chunk_length_s=30,
generate_kwargs={'language': 'polish', 'suppress_tokens': [-1]}):
Has anyone else encountered this issue?
I've tried Faster-Whisper - there, token suppression makes no difference in speed of inference - but I prefer pipelines for my project.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Python 3.10.12
Transformers 4.41.0.dev0
Whisper 20231117
Getting token IDs for suppression:
Pipeline setup:
Inference (slow, roughly CPU speed):
Inference (fast as expected on GPU)
Has anyone else encountered this issue?
I've tried Faster-Whisper - there, token suppression makes no difference in speed of inference - but I prefer pipelines for my project.
Beta Was this translation helpful? Give feedback.
All reactions