CoolFace
Modelpublic

eae1212/vosk-tts-ru-0.9-prepared

sourceHugging Faceapache-2.0updated 25d agoView on Hugging Face
0likes154downloads
Model Card

Vosk-TTS ru 0.9-multi — synthesizer prepared for fast loading on Android

This is one file from `vosk-model-tts-ru-0.9-multi`, passed through onnxruntime.quantization.shape_inference.quant_pre_process (symbolic shape inference + graph simplification).

The weights are not touched. No quantization, no precision loss. Only the graph structure is cleaned up.

Why

The original model.onnx takes 25 seconds to load on an Android phone (Snapdragon, 8 cores) — and that is not graph optimization: it is equally slow with optimization disabled. The prepared file loads in 1 second.

Measured on device, ONNX Runtime 1.24.3, best of three runs:

filesizeloadsynthesis (ratio to audio length)
model.onnx (original)179 MB25.3 s0.27
model_prep.onnx (this)174 MB1.0 s0.27
int8 quantized124 MB0.8 s0.25

Quantization turned out unnecessary: the prepared full-precision file is just as fast to load and loses nothing.

What is here

filesizenote
model_prep.onnx174 MBsynthesizer, prepared (this is the whole point)
bert/model.onnx654 MBlanguage model, unmodified copy of the original
bert/vocab.txt1.8 MBits WordPiece vocabulary
config.json3 KBphoneme table and inference settings

The language model needed no preparation — it already loads in 0.9 s. It is mirrored here only so that everything sits in one place; it is byte-identical to the file inside the official archive.

Not here: the dictionary file (101 MB). It is a plain text pronunciation dictionary and is better converted to a binary format for mobile use.

Everything original is at <https://alphacephei.com/vosk/models>.

Как это сделано

python
from onnxruntime.quantization.shape_inference import quant_pre_process
quant_pre_process("model.onnx", "model_prep.onnx", skip_symbolic_shape=False)

Файл получен из официальной модели Vosk-TTS без изменения весов — только приведение графа в порядок. Исходная модель грузится на телефоне 25 секунд на любом уровне оптимизации, включая отключённую; подготовленная — за одну.

Credits

Original model and all training work: Alpha Cephei, alphacep/vosk-tts. Licensed under Apache 2.0, same license applies here.