StyleTTS2 Ukrainian (multispeaker) — ONNX export
An ONNX export of patriotyk/styletts2_ukrainian_multispeaker for on-device inference (ONNX Runtime, e.g. iOS). This repository adds no new training — it is a faithful export of patriotyk's PyTorch weights, plus a small graph fix so the model loads in ONNX Runtime.
All credit for the model, training data, and Ukrainian front-end belongs to @patriotyk. Please cite and support the original work.
Source
- Model: patriotyk/styletts2_ukrainian_multispeaker
- Inference / export code: patriotyk/styletts2-inference
- Front-end (stress + IPA): patriotyk/ukrainian-word-stress, patriotyk/ipa-uk
- Demo: patriotyk/styletts2-ukrainian
What was changed
- Exported the PyTorch model to ONNX with
torch.onnx.export(opset 19), using patriotyk's ownexport_onnx.pyprocedure. - Applied the one required graph fix: a
Transposenode whosepermcontained-1(which ONNX Runtime rejects) was rewritten to2. This is the same patch patriotyk's export script applies. The file here is already patched — no post-processing is needed to load it in ORT.
Files
| file | description |
|---|---|
model.onnx |
the exported + patched model (330 MB) |
config.yml |
model config (vocab, params) — from the source repo |
style_denys.pt / style_denys.bin |
the "Денис Денисенко" speaker style vector (s_prev, 256 float32), as torch tensor and raw little-endian floats |
Inputs / outputs
| name | type | shape |
|---|---|---|
tokens |
int64 | [seq_length] |
speed |
float32 | scalar |
s_prev |
float32 | [1, 256] (a speaker style vector) |
output_wav |
float32 | [seq_length] — 24 kHz mono PCM |
Tokens are produced by patriotyk's front-end
(ukrainian-word-stress → ipa-uk → tokenizer over the config.yml vocab).
License
MIT, inherited from the source model. See LICENSE.