Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rlx-tiny-tts
TinyTTS (tronghieuit/tiny-tts) — a MeloTTS / VITS2-style English text-to-speech model — running natively on RLX at 44.1 kHz. The four exported ONNX subgraphs (text_encoder, duration_predictor, flow, decoder) are imported into rlx-ir HIR and compiled per device; the monotonic-alignment + latent-sampling glue is reimplemented in Rust.
Quick start
# [--device cpu|metal|mlx|cuda|rocm|gpu] [--speaker MALE] [--speed 1.0] [--seed 1234]
--data is an RLX TinyTTS bundle (see scripts/export_tiny_tts.py): config.json,
onnx/{text_encoder,duration_predictor,flow,decoder}.onnx, and a frontend/ asset dir.
With no --device, the bin picks the best available accelerator (Metal → MLX → wgpu, else CPU).
Public API
use ;
let model = load_from_dir?;
let opts = from_config;
// Full pipeline: raw text → 44.1 kHz mono waveform, every graph on `device`.
let wav = model.synthesize_on?;
// or `model.synthesize(text, &opts)` for the CPU backend.
println!;
Wav { samples, sample_rate } is the output; text_to_ids exposes the raw
(phone, tone, lang) ids. The English text frontend (CMUdict + g2p_en + tagger + BERT)
is reused byte-identically from rlx-inflect-nano
(re-exported as rlx_tiny_tts::frontend).
Backends
The ONNX graphs compile per device, so TinyTTS runs on every RLX backend:
| Feature | --device |
Backend |
|---|---|---|
cpu (default) |
cpu |
rlx-cpu (numeric reference) |
metal |
metal |
Apple Metal |
mlx |
mlx |
Apple MLX |
cuda / rocm |
cuda / rocm |
NVIDIA / AMD |
gpu / vulkan |
gpu |
wgpu (Metal / Vulkan / DX12) |
coreml |
ane |
Apple CoreML (ANE / GPU / CPU) |
Convenience bundles: apple-silicon, nvidia-gpu, amd-gpu, all-backends.
Examples
keystone, flow_probe, tenc_probe, dec_probe, compile_all, debug_shapes under
examples/ exercise individual subgraphs (single-stage parity / shape debugging).