Views
No views yet
| Emotion voicepacks |
|---|
bf_neutral · bf_happy · bf_sad · bf_angry · bf_excited · bf_disgust · bf_sarcastic · bf_surprised |
bf_ = British female, matching the source speaker.)semidark/kikiri-tts (patched StyleTTS2)multispeaker), so the style space separates per emotion; one voicepack extracted per emotion| Path | What |
|---|---|
kokoro_voxi_v1.pth | Converted Kokoro-format inference weights (use this) |
voices/bf_*.pt | The 8 emotion voicepacks |
config.json | Kokoro model config |
speaker_map.json | emotion ↔ training speaker-id map |
checkpoints/epoch_2nd_00022.pth | Full Stage-2 training checkpoint (to resume) |
checkpoints/first_stage.pth | Stage-1 checkpoint (also used as style-encoder source for voicepack extraction) |
1import torch, numpy as np, soundfile as sf
2from huggingface_hub import hf_hub_download
3from kokoro import KModel, KPipeline
4
5repo = "Joshuant/voxi-tts"
6model_path = hf_hub_download(repo, "kokoro_voxi_v1.pth")
7config_path = hf_hub_download(repo, "config.json")
8voice_path = hf_hub_download(repo, "voices/bf_angry.pt") # pick an emotion
9
10km = KModel(repo_id="hexgrad/Kokoro-82M", config=config_path, model=model_path).eval()
11pipe = KPipeline(lang_code="b", repo_id="hexgrad/Kokoro-82M", model=km) # b = British English
12voice = torch.load(voice_path, map_location="cpu", weights_only=True)
13
14audio = np.concatenate([a for _, _, a in pipe("I can't believe you actually did that.", voice=voice)])
15sf.write("out.wav", audio, 24000)voices/bf_<emotion>.pt.[emotion] tagsvoxi_speak.py wrapper adds inline [emotion] tags by switching voicepacks per span and stitching the audio:1from voxi_speak import VoxiSpeaker
2voxi = VoxiSpeaker() # auto-downloads this repo from the Hub
3audio = voxi.speak("[happy] I'm so glad you came! [sad] But now you must go. [angry] And you didn't even tell me!")
4voxi.save("out.wav", audio)1python voxi_speak.py "[angry] Get out! [neutral] ...please." -o out.wav
2python voxi_speak.py --list # emotions + aliases[joy]→happy, [anger]→angry, [surprise]→surprised, [disgusted]→disgust, [sarcasm]→sarcastic, etc.default (neutral). Unknown tags are ignored with a warning (the current emotion continues).gap_ms) is inserted between emotion spans.neutral · happy · sad · angry · excited · disgust · sarcastic · surprised.sarcastic, disgust) may be subtler.misaki with phonemizer-fork + espeakng_loader, and lang_code="b".