Downloads · 30 days
3.1K
46% of all-time downloads
Joakim/kokoro-sv-voices
kokoro-sv-voices is a text-to-speech model from Joakim. Use it when you need text read aloud. The card lists the license as apache-2.0.
A Swedish Kokoro-82M model fine-tuned on 23 real Swedish speakers (NST + LibriVox, ~8.6 h), shipped with 10 named voicepacks. One model, many voices — each voice is a 512 KB style tensor; the model reproduces each spe…
Downloads · 30 days
3.1K
46% of all-time downloads
All-time downloads
6.8K
Public
Repo size
1.3 GB
Likes
8
Public
Click a slice to open those files.
.pth982 MB · 99%
From the Hugging Face model README
A Swedish Kokoro-82M model fine-tuned on 23 real Swedish speakers (NST + LibriVox, ~8.6 h), shipped with 10 named voicepacks. One model, many voices — each voice is a 512 KB style tensor; the model reproduces each speaker's prosody, so the voices are genuinely dynamic (not the flat prosody typical of single-speaker distillation).
Two more voices, Klara and Viktor, ship with their own fine-tuned weights (see below).
| voice | voice | ||
|---|---|---|---|
| Alice ♀ calm | Björn ♂ deep | ||
| Elsa ♀ | Lars ♂ | ||
| Ebba ♀ | Nils ♂ | ||
| Stina ♀ expressive | Anton ♂ | ||
| Greta ♀ (skånska accent) | Oskar ♂ | ||
| Klara ♀ own model, lively | Viktor ♂ own model, lively |
A voicepack only sets timbre; the prosody comes from the shared predictor. Klara and
Viktor were therefore made differently: each started from a reference take generated
with VoxCPM2 voice design, VoxCPM2 cloned
that take on ~2,300 Swedish sentences (~2.8 h each, every clip gated on speaker
similarity and ASR CER), and the multi-speaker model was fine-tuned on that set
(stage 2, 5 epochs) into a separate model per voice. They are livelier than a
voicepack on the shared model (F0 variation 7.7 / 7.1 semitones vs 6.5 / 5.6 for
their own packs on kokoro_sv.pth), at the same intelligibility.
voices_manifest.json names their weights ("model": "models/<Name>.pth"); load that
file instead of kokoro_sv.pth for these two. A Klara or Viktor pack used on the
shared model gives their timbre with the flatter shared prosody.
Prosody-responsiveness is measured: feeding a monotone speaker's voicepack yields ~4.9 semitone F0-variation; an expressive one yields ~9.5 — the style vector genuinely steers delivery.
| file | what |
|---|---|
kokoro_sv.pth | KModel-format multi-speaker weights |
voices/<Name>.pt | [510,1,256] voicepack per named voice |
models/<Name>.pth | own KModel weights for Klara and Viktor (use with their voicepack) |
voices_manifest.json | gender, role, and model for voices with their own weights |
config.json | Swedish 178-token Kokoro config |
samples/<Name>.wav | one sample line per voice |
The neural Swedish G2P (required — inference must phonemize identically to
training) lives in Joakim/swedish-kokoro.
import torch, soundfile as sf
from kokoro import KModel
from scipy.signal import iirnotch, filtfilt
from g2p_sv import SwedishG2P # SV_NEURAL_G2P=nst_g2p
model = KModel(repo_id="hexgrad/Kokoro-82M", config="config.json", model="kokoro_sv.pth").eval()
voice = torch.load("voices/Stina.pt", weights_only=True) # pick any voice
# Klara / Viktor: model="models/Klara.pth" with voices/Klara.pt
g2p = SwedishG2P(backend="neural")
ipa = g2p("Hej, jag är CandyTron, din godisrobot!")
ids = [i for i in (model.vocab.get(p) for p in ipa) if i is not None]
audio = model.forward_with_tokens(torch.LongTensor([[0]+ids+[0]]), voice[len(ids)-1], speed=1.0)[0].squeeze().numpy()
for f0 in (2400, 4800, 7200, 9600): # notch the fine-tune upsampler tones
b, a = iirnotch(f0, Q=35, fs=24000); audio = filtfilt(b, a, audio)
sf.write("out.wav", audio, 24000)
Voicepacks interpolate: 0.6*voiceA + 0.4*voiceB gives an intermediate voice/intensity.
KTH/nst)
datadriven-company/TTS-Swedish, CC0).max_len 800, decoder-lr 1e-5.
Checkpoints selected by ASR-gated evaluation (KBLab VoxRex CER + DNSMOS), never loss alone.hexgrad/Kokoro-82M · openbmb/VoxCPM2 · semidark/kikiri-tts · yl4579/StyleTTS2 · Språkbanken/NST · KBLab VoxRex (eval)