Repository navigation
V2.5.0 — Text Normalization & BlueTTS2.5
Multilingual TTS in Hebrew, English, Spanish, Italian and German — try it at bluetts.com.
git clone https://github.com/maxmelichov/BlueTTS.git && cd BlueTTS && uv sync
uv run hf download notmax123/BlueTTS2.5-onnx --repo-type model --local-dir ./onnx_modelsfrom blue_onnx import BlueTTS
tts = BlueTTS(onnx_dir="onnx_models", style_json="voices/noa.json")
samples, sr = tts.synthesize("שלום, זהו מודל דיבור בעברית.", lang="he")Highlights
Text normalization. Anything the phonemizer cannot read aloud now becomes words first — numbers, prices, percentages, ratios, dates, clock times, phone numbers, emails, ticket/model codes, brackets, markdown headers, emoji, and Hebrew spelling quirks (gershayim, phonetic geresh, hyphenated compounds). It is locale-aware: 1,500 is a thousand in English/Hebrew, 1.500 is a thousand in German/Spanish/Italian. Spelled codes, phone numbers, dates and times are synthesized as separate slower spans so digit groups stay intelligible.
BlueTTS front end. One call from graphs + voice to (samples, sample_rate), with normalization and peak limiting on by default. TextToSpeech remains available for per-call styles, batching and phoneme input.
Peak limiting. The vocoder overshoots ±1.0 (peaks of 1.1–1.25 measured), which clips when written to a PCM WAV. limit_peak() scales once instead of distorting.
BlueTTS2.5-onnx bundle support. The new bundle uses a separate style-conditioned duration graph, a vocoder that takes the de-normalized latent, and its own extended vocab. All three are detected from the graphs themselves, so both it and blue-onnx-v2 work unchanged.
Hebrew G2P is now RenikudPlus, which fetches its own weights on first Hebrew synthesis. Latin-only synthesis never downloads them.
New voices — adam, daniel, lily, noa, replacing female1/male1.
Fixes
- TensorRT applied classifier-free guidance twice. Engines built from
exports/export_onnx.pyalready returnu + cfg*(c − u); the two-pass formula ran on top of that. - TensorRT read the duration predictor's seconds output as a frame count. A 2.489 s utterance became
T_lat=2, which the clamp floored to 10 frames — every utterance under ~10 s of speech came out as a fixed 0.70 s regardless of text. pip installproduced a broken package.vocab.jsonresolved tosite-packages/vocab.jsonand was never packaged, so every entry point raisedFileNotFoundError. It now lives inside the package.- Emoji were read aloud. They were stripped after G2P, so espeak had already verbalized them — "Nice 🎉 party" became "nice party popper party".
<en>spans could be torn apart. An email with digits nested a second tag pair inside an existing span, stranding the domain on the wrong language's G2P.blue_ptsynthesized from random weights in silence.load_state_dict(strict=False)hid a total checkpoint mismatch — 14/143 and 1/355 parameters loaded. It now aligns the checkpoint namespace and refuses to run below half.length_to_maskraised on a zero length.
Behavior changes
- All Hebrew audio differs from V2.0.0 — the G2P changed.
BlueTTS's defaultstyle_jsonis nowvoices/noa.json.- The
model.onnxworking-directory auto-detect is gone; weights download automatically, or passrenikud_path. cfg_scalenow takes effect on bundles shippinguncond.npz— that path was previously dead code.num2wordsis a new required dependency.- Docs moved next to the code:
src/blue_onnx/,examples/,exports/,training/.
Known limitations
TextToSpeech.batch()needs graphs exported with a dynamic batch axis. Both published bundles are batch-1;exports/export_onnx.pydeclares the dynamic axes, so a re-export enables it.- Zero-shot voice conversion (
examples/zero_shot.py,blue_onnx.style) needscodec_encoder/style_encoder/duration_style_encoder, which only ship in theblue-onnx-v2bundle. - The TensorRT fixes above are reviewed but not executed —
tensorrtcannot be installed on macOS, where this was developed. Worth a smoke test on CUDA.