Instructions to use openai/whisper-large-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/whisper-large-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("openai/whisper-large-v3") model = AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-large-v3", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Error with word level timestamps
This helped in my case by changing stride[0] to stride[0][0] : https://github.com/huggingface/transformers/issues/26253#issuecomment-1804255466
However, i could not run this on device = 'mps' , but works fine on device = 'cpu'
Where did you make the change for stride? Did it work on GPU?
This helped in my case by changing stride[0] to stride[0][0] : https://github.com/huggingface/transformers/issues/26253#issuecomment-1804255466
However, i could not run this on device = 'mps' , but works fine on device = 'cpu'
I just checked it for GPU with device = 'cuda:0', this works, but you will need to disable 'Flash Attention' if you are using that. Otherwise works as intended.
This helped in my case by changing stride[0] to stride[0][0] : https://github.com/huggingface/transformers/issues/26253#issuecomment-1804255466
However, i could not run this on device = 'mps' , but works fine on device = 'cpu'I just checked it for GPU with device = 'cuda:0', this works, but you will need to disable 'Flash Attention' if you are using that. Otherwise works as intended.
Actually I got the error with GPU, the pipeline code remains the same as model card
Setting the batch size to 1 works for me.
pipe = pipeline(
batch_size=1,
)
result = pipe(sample, return_timestamps="word")
Setting the batch size to 1 works for me.
pipe = pipeline(
batch_size=1,
)
result = pipe(sample, return_timestamps="word")
So it only works when batch_size set to 1?
