Instructions to use KBLab/kb-whisper-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KBLab/kb-whisper-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="KBLab/kb-whisper-large")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("KBLab/kb-whisper-large") model = AutoModelForSpeechSeq2Seq.from_pretrained("KBLab/kb-whisper-large") - Notebooks
- Google Colab
- Kaggle
Problems with timestamps
#2
by jalberth - opened
I can't get return_timestamps=True to save the transcription with timestamps. I'm using the simple code from the model card and saving the res variable as JSON.
pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
torch_dtype=torch_dtype,
device=device,
return_timestamps=True,
)
I tried with a short audio.mp3, so I had to decrease chunk_length_s to 10 in the call to pipe to get it to work.
Perfect, now I got it to work. I wrongly put the argument in the generate_kwargs.
thx for the clarification.
Lauler changed discussion status to closed