BlueV3 β ONNX Runtime Bundle
ONNX export of BlueV3 TTS for CPU / CUDA / TensorRT inference. Includes the vocoder (codec decoder).
TTS version: v1.7.3 Β· Sample rate: 44.1 kHz Β· Exported from PyTorch ckpt_step_767000 + AE ae_541000
Contents
| File | Role |
|---|---|
text_encoder.onnx |
Phoneme IDs + style β text embedding |
vector_estimator.onnx |
Flow-matching Euler step (CFG baked in) |
vocoder.onnx |
Latent β 44.1 kHz waveform (codec) |
duration_predictor.onnx |
Text + style_dp β duration (seconds) |
stats.npz |
Latent mean / std / normalizer_scale |
uncond.npz |
Unconditional tokens (CFG / debugging) |
tts.json |
Runtime config |
Companion repo
PyTorch weights (no codec): notmax123/BlueV3
Download
hf download notmax123/BlueV3-onnx --local-dir ./onnx_models
Inference contract
- Style β provide
style_ttl[1, 50, 256]andstyle_dp[1, 8, 16](from a style JSON / reference encoder). - Text β IPA / phoneme string β
text_ids,text_mask. - Duration β
duration_predictorβ seconds; divide byspeed; convert to latent length withbase_chunk_size=512,chunk_compress_factor=6. - Encode β
text_encoder(text_ids, style_ttl, text_mask)βtext_emb. - Sample β loop
vector_estimatorforNsteps (e.g. 8). Output is the next latent state (CFG is inside the graph; do not apply CFG again). - Decode β unnormalize with
stats.npz:
optionally drop the last compressed frame, thenz = (x / normalizer_scale) * std + mean # raw 144-dvocoder(latent=z)βwav_tts.
vocoder.onnx expects raw (unnormalized) 144-channel latents (normalizer_scale=1 inside the export).
Example (this codebase)
# ONNX (ORT CUDA / CPU)
uv run python run_onnx_inference.py --onnx_dir ./onnx_models --speaker netsiga --steps 8
# TensorRT (after building engines from these ONNX files)
uv run python create_tensorrt.py --onnx_dir ./onnx_models --engine_dir trt_engines
uv run python benchmark_trt.py --style_json voice_styles/Rotem.json --steps 8 --out out.wav
I/O cheat sheet
text_encoder: text_ids, style_ttl, text_mask β text_emb
vector_estimator: noisy_latent, text_emb, style_ttl, latent_mask, text_mask, current_step, total_step β denoised_latent
duration_predictor: text_ids, style_dp, text_mask β duration
vocoder: latent [B, 144, T] β wav_tts
License
MIT (see frontmatter).