Kokoro-class
StyleTTS2
text-to-speech for
3 voices × 6 registers
, where expressive
register (neutral / breathless / playful / urgent / tender / whisper) lives in the
style
space
and is selected via a
voicepack
— not baked into the text. Trained from scratch.
import numpy as np, onnxruntime as ort
from misaki import en
from kokoro_symbols import TextCleaner
sess = ort.InferenceSession("susurro.onnx", providers=["CPUExecutionProvider"])
g2p, clean = en.G2P(trf=False, british=False, fallback=None), TextCleaner()
ipa = g2p("The keys are on the table by the door.")[0].replace("ʏ", "y")
input_ids = np.array([[0, *clean(ipa), 0]], dtype=np.int64) # BOS/EOS = 0
ref_s = np.load("voicepacks.npz")["voice_c__whisper"].reshape(1, 256).astype(np.float32)
audio = sess.run(None, {"input_ids": input_ids, "ref_s": ref_s})[0] # float32, 24 kHz
Inputs:
input_ids [1, T] int64
(phoneme token ids wrapped with
0
),
ref_s [1, 256]
(a voicepack).
Output:
audio [N] float32
at 24 kHz. The token axis and audio length are
dynamic.
Quickstart — raw PyTorch
Bundles the StyleTTS2 model code and the PLBERT/ASR/JDC utility-net assets under
styletts2/
,
so a plain clone runs without fetching anything else.
pip install -r requirements.txt
python infer.py \
--voicepack voicepacks/voice_a__tender.pt \
--text "Hey, I wasn't expecting you tonight." \
--out hello.wav
Runs on CPU or CUDA (auto-detected;
--device cpu|cuda
).
transformers
is pinned to 4.x in
requirements-raw.txt
because the bundled PLBERT loader targets
AlbertModel
as it was at
train time.
Voices & registers
voice_a
,
voice_b
,
voice_c
×
{neutral, breathless, playful, urgent, tender, whisper}
.
Pick any combination by name.
whisper
and
urgent
are the most acoustically distinct;
breathless / neutral / playful / tender
cluster more tightly in style space (a subtle-
register limit inherited from the synthetic source — see Limitations).
Scored vs the ground-truth Higgs ceiling (CER 0.004 / UTMOS 4.25); best checkpoint selected by
eval (not by max epoch — stage 2 is non-monotonic).
Metric
susurro
GT ceiling
Notes
CER (faster-whisper, eval_text)
0.011
0.004
intelligibility round-trip; near ceiling
UTMOS
4.32
4.25
no-reference naturalness; above the synthetic-data ceiling
register separation
see note
see note
report per-register centroid cosine + ears (silhouette is speaker-confounded)
Winner checkpoint:
epoch_2nd_00024
(selected over epochs 18–24).
Intended use & limitations
Use:
expressive English narration/dialogue for the 3 provided voices.
Not:
voice cloning of arbitrary speakers; non-English text (English G2P only).
Limitations:
synthetic-voice timbre is bounded by the source quality. Register strength is
uneven —
whisper and urgent are clearly distinct; breathless, neutral, playful, tender are
subtle
(close in style space, matching the source). Intelligibility/naturalness are strong
across all registers and voices.
susurro huggingface.co is an AI model on huggingface.co that provides susurro's model effect (), which can be used instantly with this aimeri susurro model. huggingface.co supports a free trial of the susurro model, and also provides paid use of the susurro. Support call susurro model through api, including Node.js, Python, http.
susurro huggingface.co is an online trial and call api platform, which integrates susurro's modeling effects, including api services, and provides a free online trial of susurro, you can try susurro online for free by clicking the link below.
susurro is an open source model from GitHub that offers a free installation service, and any user can find susurro on GitHub to install. At the same time, huggingface.co provides the effect of susurro install, users can directly use susurro installed effect in huggingface.co for debugging and trial. It also supports api for free installation.