Downloads · 30 days
13
20% of all-time downloads
scribe-project/nb-whisper-dialect-id-5dialect
nb-whisper-dialect-id-5dialect is a audio classification model from scribe-project. Use it for the audio classification task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
A NbAiLab/nb-whisper-medium encoder fine-tuned for 5-class Norwegian dialect identification.
Downloads · 30 days
13
20% of all-time downloads
All-time downloads
66
Public
Parameters
307M
615 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors615 MB · 100%
From the Hugging Face model README
A NbAiLab/nb-whisper-medium encoder fine-tuned for 5-class Norwegian dialect identification.
Given an audio clip of Norwegian speech, the model predicts which of five broad dialect regions the speaker belongs to:
| Label | Region |
|---|---|
east | Eastern Norwegian (østnorsk) |
west | Western Norwegian (vestnorsk) |
mid | Central/Trøndersk Norwegian (trøndersk) |
north | Northern Norwegian (nordnorsk) |
south | Southern Norwegian (sørlandsk) |
Results from this model are discussed in further detail in:
Phoebe Parsons, Per Erik Solberg, Knut Kvale, Torbjørn Svendsen, and Giampiero Salvi. (2025). Adding Metadata to Existing Parliamentary Speech Corpus. In Proceedings of the Joint 25th Nordic Conference on Computational Linguistics and 11th Baltic Conference on Human Language Technologies (NoDaLiDa/Baltic-HLT 2025), pages 448–457, Tallinn, Estonia. University of Tartu Library.
The model is NbAiLab/nb-whisper-medium's encoder with a classification head on top
(WhisperForAudioClassification), fully fine-tuned (no layers frozen) for sequence classification
over 5 dialect labels.
Intended for research on Norwegian dialect identification — e.g. as a component in dialect-aware speech pipelines, or as a baseline for further dialect-ID research. It is not intended for consequential decisions about individuals (e.g. hiring, legal, or identity-verification contexts).
Known limitations:
results_dir/.import torch
from transformers import AutoFeatureExtractor, AutoModelForAudioClassification
import librosa
model_id = "scribe-project/nb-whisper-dialect-id-5dialect"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id)
model = AutoModelForAudioClassification.from_pretrained(model_id)
audio, sr = librosa.load("path/to/audio.wav", sr=feature_extractor.sampling_rate, mono=True)
inputs = feature_extractor(
audio,
sampling_rate=feature_extractor.sampling_rate,
return_tensors="pt",
)
with torch.no_grad():
logits = model(**inputs).logits
predicted_id = torch.argmax(logits, dim=-1).item()
print(model.config.id2label[predicted_id])
Audio should be mono, resampled to 16kHz. Clips longer than 30 seconds were randomly subsampled to 30 seconds during training.
Trained on the SSC (Storting/Parliament Speech Corpus), using a speaker-disjoint train/validation split (no speaker overlap between train and eval). Each example is a single-speaker audio segment labeled with one of the 5 dialect categories above. The assignment of dialect labels are discussed in more detail in Parsons et al.
load_best_model_at_end)| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.0336 | 1.0 | 453 | 0.4355 | 0.8941 |
| 0.0163 | 2.0 | 906 | 0.2988 | 0.9263 |
| 0.0076 | 3.0 | 1359 | 0.5142 | 0.8868 |
The weights published in this repo are from epoch 2 (checkpoint-906) — the best-performing checkpoint — not the final epoch-3 checkpoint, which had started to overfit (training loss kept falling while validation accuracy dropped).