The National Library of Sweden releases a new suite of Whisper models trained on over 50,000 hours of Swedish speech. In evaluations across FLEURS, CommonVoice and NST, our best performing model reduces the Word Error Rate (WER) by an average of 47% compared to OpenAI's whisper-large-v3. The performance of smaller Whisper model sizes on Swedish speech has also substantially improved, with kb-whisper-small outperforming openai/whisper-large-v3 (a model six times its size).
Table: Word Error Rate (WER) comparison between KBLab's Whisper models and the corresponding OpenAI versions.
Usage
We provide checkpoints in different formats: Hugging Face, whisper.cpp (GGML), onnx, and ctranslate2 (used in faster-whisper and WhisperX).
2025-05-13 Update!
The default when loading our models through Hugging Face is Stage 2.
As of May 2025 there exists two Stage 2 versions in addition to the default, namely Subtitle and Strict that specify the transcription style.
By specifying revision="subtitle" in .from_pretrained() the model version with a more condensed style of transcribing is accessed.
By specifying revision="strict" in .from_pretrained() the more verbatim-like version of the model is accessed.
Below is an example of how this argument is passed in the .from_pretrained() function
The verbosity of the transcription styles of the three model versions ranges from the least verbose Subtitle, to Stage 2 (default) to the most verbose Strict.
Hugging Face
Inference example for using KB-Whisper with Hugging Face:
Faster-whisper provides fast and efficient inference via a reimplementation of Whisper using ctranslate2.
python
1#### faster-whisper model ####2from faster_whisper import WhisperModel
34model_id ="KBLab/kb-whisper-base"5model = WhisperModel(6 model_id,7 device="cuda",8 compute_type="float16",9 download_root="cache",# cache directory10# condition_on_previous_text = False # Can reduce hallucinations if we don't use prompts11)1213# Transcribe audio.wav (convert to 16khz mono wav first via ffmpeg)14segments, info = model.transcribe("audio.wav", condition_on_previous_text=False)15print("Detected language '%s' with probability %f"%(info.language, info.language_probability))1617for segment in segments:18print("[%.2fs -> %.2fs] %s"%(segment.start, segment.end, segment.text))
WhisperX
WhisperX provides a convenient method of getting accurate word level timestamps. The library combines (force aligns) the text output of Whisper with the accurate timestamps of Wav2vec2. We provide an example below of how to use KB-Whisper together with KBLab/wav2vec2-large-voxrex-swedish.
python
1import whisperx
23device ="cuda"4audio_file ="audio.wav"5batch_size =16# reduce if low on GPU mem6compute_type ="float16"# change to "int8" if low on GPU mem (may reduce accuracy)78# 1. Transcribe with original whisper (batched)9model = whisperx.load_model(10"KBLab/kb-whisper-base", device, compute_type=compute_type, download_root="cache"# cache_dir11)1213audio = whisperx.load_audio(audio_file)14result = model.transcribe(audio, batch_size=batch_size)15print(result["segments"])# before alignment1617# delete model if low on GPU resources18# import gc; gc.collect(); torch.cuda.empty_cache(); del model1920# 2. Align whisper output21model_a, metadata = whisperx.load_align_model(22 language_code=result["language"],23 device=device,24 model_name="KBLab/wav2vec2-large-voxrex-swedish",25 model_dir="cache",# cache_dir26)27result = whisperx.align(28 result["segments"], model_a, metadata, audio, device, return_char_alignments=False29)3031print(result["segments"])# word level timestamps after alignment
Whisper.cpp / GGML
We provide GGML checkpoints used in the apps whisper.cpp and MacWhisper. To use our model with whisper.cpp first clone the repository and build the library:
To use the model you need to download one of the GGML checkpoints we have uploaded. You can either press the download buttons here, or download using wget:
wget https://huggingface.co/KBLab/kb-whisper-base/resolve/main/ggml-model-q5_0.bin # Quantized version
# wget https://huggingface.co/KBLab/kb-whisper-base/resolve/main/ggml-model.bin # Non-quantized version
Run inference by specifying the model path after the argument -m, along with the path to the audio file as the last positional argument.
An example of an app that runs inference locally in the browser with transformers.js and KB-Whisper can be found at https://whisper.mesu.re/ (created by Pierre Mesure). A template for setting up such an app with javascript can be found at https://github.com/xenova/whisper-web.
Training data
Our models have been trained on over 50,000 hours of Swedish audio with text transcriptions. The models were trained in 2 stages, each characterized by the application of different quality filters and thresholds for said filters.
Stage 1 employed low threshold values (0 to 0.30 BLEU depending on dataset), whereas Stage 2 used stricter thresholds (BLEU >= 0.7, weighted ROUGE-N >= 0.7, CER of first and last 10 characters <= 0.2).
Dataset
Continued pretraining (h) -- Stage 1
Finetuning (h) -- Stage 2
Subtitles
34,261
3,110
Riksdag
21,949
5,119
ISOF
54
54
NST
250
250
Total
56,514
8,533
The default when loading our models through Hugging Face is Stage 2. We have however also uploaded continued pretraining checkpoints and tagged them. You can load these other checkpoints by specifying the revision in .from_pretrained(). The pretrained checkpoints tag can for example be found here: pretrained-checkpoint. The Stage 2 default model tag is named standard. We supply two different stage 2 checkpoints -- one with a more condensed style of transcribing -- under the name subtitle, and one more verbose called strict.
We acknowledge the EuroHPC Joint Undertaking for awarding this project access to the EuroHPC supercomputer LEONARDO, hosted by CINECA (Italy) and the LEONARDO consortium through an EuroHPC AI and Data-Intensive Applications Access call.
Citation
KB-Whisper is a product of KBLab of the National Library of Sweden.
Key contributors include Faton Rekathati, Justyna Sikora, Robin Kurtz, Agnes Toftgård, and Leonora Vesterbacka, under the direction of Love Börjeson.
Please refer to the following paper if you want to cite our work with KB-Whisper.
Vesterbacka, L., Rekathati, F., Kurtz, R., Sikora, J., Toftgård, A. (2025) Swedish Whispers; Leveraging a Massive Speech Corpus for Swedish Speech Recognition. Proc. Interspeech 2025, 758-762, doi: 10.21437/Interspeech.2025-2646
Bibtex citation:
@inproceedings{vesterbacka25_interspeech,
title = {{Swedish Whispers; Leveraging a Massive Speech Corpus for Swedish Speech Recognition}},
author = {{Leonora Vesterbacka and Faton Rekathati and Robin Kurtz and Justyna Sikora and Agnes Toftgård}},
year = {{2025}},
booktitle = {{Interspeech 2025}},
pages = {{758--762}},
doi = {{10.21437/Interspeech.2025-2646}},
issn = {{2958-1796}},
}