vosk-tts-ru-0.10-prepared
The synthesizer graph from alphacep/vosk-tts
vosk-model-tts-ru-0.10-multi (57 Russian voices), run once through:
from onnxruntime.quantization.shape_inference import quant_pre_process
quant_pre_process("model.onnx", "model_fp32.onnx", skip_symbolic_shape=False)
onnx==1.22.0, onnxruntime==1.23.2. This resolves the graph's symbolic/dynamic shapes
and cleans up the ONNX graph ahead of time. Weights and precision are untouched — this
is not quantization.
Why
The raw graph has dynamic shapes that ONNX Runtime re-resolves on every single
InferenceSession load, regardless of GraphOptimizationLevel or caching an already
graph-optimized .ort file — measured at 45-65 s either way. This prepared graph
builds an equivalent .ort cache in ~1-7 s, and loads that cache back in ~1.3 s.
Correctness
Bit-identical output vs. the original on synthetic inputs (noise scales zeroed,
max_abs_diff = 0.0). On real synthesized speech (voices 0/10/56, noise disabled): same
output length, correlation > 0.9999999 vs. the original, RMS error < 1 PCM16 unit.
Files
model_fp32.onnx— the prepared synthesizer graph (drop-in replacement forvosk-model-tts-ru-0.10-multi/model.onnx; BERT and the pronunciation dictionary are unmodified and still come from the original AlphaCephei release).
Source
Based on alphacep/vosk-tts (Apache 2.0). Approach follows eae1212/vosk-tts-ru-0.9-prepared, applied here to the 0.10-multi (57-voice) model instead of 0.9 (5-voice).