Preliminary release candidate of the National Library of Sweden's new Whisper models for Swedish. This version is for testing only. We will be tuning the performance with additional post-training to reduce hallucations before releasing the final version of the model.
Usage
import torch
from datasets import load_dataset
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
device = "cuda:0"if torch.cuda.is_available() else"cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
model_id = "KBLab/kb-whisper-tiny-beta"
model = AutoModelForSpeechSeq2Seq.from_pretrained(
model_id, torch_dtype=torch_dtype, use_safetensors=True, cache_dir="cache"
)
model.to(device)
processor = AutoProcessor.from_pretrained(model_id)
pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
torch_dtype=torch_dtype,
device=device,
)
generate_kwargs = {"task": "transcribe", "language": "sv"}
# Add return_timestamps=True for output with timestamps
res = pipe("audio.mp3",
chunk_length_s=30,
generate_kwargs={"task": "transcribe", "language": "sv"})
Runs of KBLab kb-whisper-tiny-beta on huggingface.co
25
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About kb-whisper-tiny-beta huggingface.co Model
kb-whisper-tiny-beta huggingface.co
kb-whisper-tiny-beta huggingface.co is an AI model on huggingface.co that provides kb-whisper-tiny-beta's model effect (), which can be used instantly with this KBLab kb-whisper-tiny-beta model. huggingface.co supports a free trial of the kb-whisper-tiny-beta model, and also provides paid use of the kb-whisper-tiny-beta. Support call kb-whisper-tiny-beta model through api, including Node.js, Python, http.
kb-whisper-tiny-beta huggingface.co is an online trial and call api platform, which integrates kb-whisper-tiny-beta's modeling effects, including api services, and provides a free online trial of kb-whisper-tiny-beta, you can try kb-whisper-tiny-beta online for free by clicking the link below.
KBLab kb-whisper-tiny-beta online free url in huggingface.co:
kb-whisper-tiny-beta is an open source model from GitHub that offers a free installation service, and any user can find kb-whisper-tiny-beta on GitHub to install. At the same time, huggingface.co provides the effect of kb-whisper-tiny-beta install, users can directly use kb-whisper-tiny-beta installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
kb-whisper-tiny-beta install url in huggingface.co: