Instructions to use rasmusjs/nb_NO-vox-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Piper
How to use rasmusjs/nb_NO-vox-medium with Piper:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
nb_NO-vox-medium
nb_NO-vox-medium is a Norwegian bokmål text-to-speech voice for
Piper. It is a distillation of the
OpenBMB VoxCPM2 teacher into a small
VITS model fine-tuned from the Norwegian talesyntese base checkpoint.
Highlights
- Norwegian bokmål — trained and verified end to end for one language
- Distilled from VoxCPM2 — teacher prosody in a 63.5 MB student
- Real time on CPU — runs on a Raspberry Pi, no GPU needed
- Home Assistant ready — a drop-in Piper voice
- Trained on spoken dates and names — years, dates, times, and common Norwegian names are part of the training data
- Open data lineage — only modern, openly licensed training text
Quick Start
Install
pip install piper-tts
This release was tested with piper-tts 1.8.0.
Piper CLI
piper \
--model nb_NO-vox-medium.onnx \
--config nb_NO-vox-medium.onnx.json \
--output_file out.wav \
-- "Værmelding for Vestlandet: Regn og frisk bris fra sjøen hele dagen."
Python
import wave
from piper import PiperVoice
voice = PiperVoice.load("nb_NO-vox-medium.onnx")
with wave.open("out.wav", "wb") as wf:
voice.synthesize_wav("Hei! Dette er en norsk stemme laget lokalt.", wf)
Home Assistant
Copy the ONNX file and the JSON config into the Piper voice directory, then select the voice.
Model Details
| Property | Value |
|---|---|
| Language | Norwegian bokmål (nb, espeak voice nb) |
| Architecture | VITS (Piper), single speaker |
| Quality | medium, 22.05 kHz mono |
| Model size | 63.5 MB ONNX |
| Base model | NbAiLab/nb-tts-norwegian-piper-trimmed (login required) Mirror (Piper talesyntese, epoch 3459, CC0 data; exact base checkpoint: epoch=3459-step=2052250.ckpt) |
| Training data | 10 333 synthetic clips, 13.9 h (10 336 passed verification; 3 dropped) |
| Fine-tuning | from epoch 3459 to 3759; released checkpoint 3744 (+285), batch 20, LR 1e-4, precision 32 |
Evaluation
Word error rate on 100 held-out Norwegian Wikipedia sentences, judged with NbAiLab/nb-whisper-large and normalized before comparison:
| Model | WER mean | WER median | Perfect clips |
|---|---|---|---|
| VoxCPM2 teacher (2B, GPU, 48 kHz) | 11.2 % | 7.4 % | 40 / 100 |
| This model | 12.5 % | 9.1 % | 31 / 100 |
The released checkpoint is epoch 3744. Four checkpoints were exported and scored on the same 100 sentences: epoch 3494 14.5 %, 3554 13.2 %, 3629 13.7 %, and 3744 12.5 % mean WER. The final choice used WER, not validation loss.
The remaining gap to the teacher is dominated by the espeak-ng nb frontend
and rare foreign names.
Targeted tests, 16 sentences each, same judge:
| Test set | This model |
|---|---|
| Dates and years | 10.1 % |
| Norwegian names | 6.0 % |
None of the 16 date or name sentences occur in the training text. The 100-sentence main set has 3 overlapping lines.
How it was made
- Corpus. 12 097 modern sentences: Wikipedia, NDLA, Alpaca sets, Språkrådet Q&A, and drill lists for names, cities, dates, times, and years. Lines from public-domain books were generated first but skipped, because the language sounded archaic.
- Generation. VoxCPM2 read every sentence with a fixed synthetic speaker ("vox8").
- Verification. NB-Whisper transcribed every clip. Text comparison used espeak-ng phonemes, so punctuation and number format do not cause false rejects. 10 336 clips passed (85 %); 1 761 were rejected after two retries. Three pathological clips were dropped before training, leaving 10 333.
- Preprocessing. Each clip was trimmed, normalized to -23 LUFS with a -0.95 dBFS peak ceiling, resampled to 22 050 Hz, and aligned to the base phoneme map.
- Fine-tuning. Checkpoints were ranked by validation loss, then the final checkpoint was selected by WER on the held-out corpus, not by validation loss.
Provenance and licensing
The audio and the transcripts are not distributed. Only the model weights are published. We found no evidence that training sentences can be recovered from the weights.
| Source | Clips | License (as recorded in the build metadata) |
|---|---|---|
| Norwegian Wikipedia dump, two Språkbanken sets | 5 195 | CC BY-SA |
| NDLA learning paragraphs | 1 945 | CC BY-SA 4.0 |
| NbAiLab/norwegian-alpaca instruction sets | 1 457 | CC BY 4.0 |
| SSB name statistics and Simplemaps Norway cities drill lists | 1 344 | factual data |
| hhval/norwegian_qa (Språkrådet språkspørsmål og svar) | 384 | Apache 2.0 |
| Unmatched text | 8 | not recorded |
| Component | Origin | License |
|---|---|---|
| Base model | NbAiLab/nb-tts-norwegian-piper-trimmed, exact checkpoint epoch=3459, NST Talesyntese data |
CC0 data |
| Teacher model | OpenBMB VoxCPM2 | Apache 2.0 |
| Training audio | Synthetic VoxCPM2 output | — |
| Piper training code | rhasspy/piper | MIT |
| Piper inference | piper1-gpl | GPL-3.0-or-later |
| These weights | this fine-tune | CC0 1.0 |
The weights are CC0 1.0, the same licence as the base checkpoint's data. Use the voice for any purpose, including commercial use. The training text keeps its own licences; it is not distributed with this model. The voice is fully synthetic and is not derived from an identifiable real person.
Samples
| Text | Audio |
|---|---|
| Weather report | sample_1_weather.wav |
| Date: 17 May 1814 | sample_2_date.wav |
| Names: Jan Hansen | sample_3_names.wav |
| Wikipedia: Folkteatern | sample_4_wikipedia.wav |
Teacher comparison
The full text of the year description is in months.txt. Both voices read the same text:
| Voice | Audio |
|---|---|
| This model | sample_5_months.wav |
| VoxCPM2 teacher | sample_6_months_teacher.wav |
Listen to both files back to back to judge the distillation gap.
Limitations
- Bokmål only. Nynorsk is untested and likely weak.
- Medium quality: good for assistants and read-aloud, not studio audio.
- Prosody is flatter than the VoxCPM2 teacher.
- Rare English loanwords and long numbers can sound wrong.
- Expand numeric dates and times before synthesis when the format is unusual.
- Do not use the voice for impersonation or disinformation. This is an AI-generated synthetic voice.
Credits
- OpenBMB VoxCPM2 — teacher model
- NbAiLab nb-whisper-large — clip verification
- rhasspy/piper — training code
- piper1-gpl — inference
- Språkbanken / Nasjonalbiblioteket — CC0 Norwegian speech
- NDLA, Wikipedia, SSB, Språkrådet — text sources
- Downloads last month
- 6
Model tree for rasmusjs/nb_NO-vox-medium
Base model
NbAiLab/nb-tts-norwegian-piper-trimmed