Antalia 1 · ONNX for the browser
ONNX conversion of Antalia 1, an open Turkish text-to-speech model by Sezgin Saygili, Emre Kaplaner, Oncel Ozgul and Fikri San Koktas (Patientdesk.ai) (code), together with its vocoder NVIDIA BigVGAN v2, for running in a web browser with onnxruntime-web (WebGPU). This is a derivative of Antalia 1 under the same license, Antalia OpenRAIL-M (LICENSE.md). It is not an official release and is not endorsed by the Antalia authors.
All speech made with these files is synthetic. Listeners must be told so wherever they could believe otherwise.
Files
| File | Size | What it is |
|---|---|---|
text.onnx |
78 MB | Text encoder and duration head, fp32. ids [1, L] int64 -> ctx [1, L, 768], log_frames [1] |
flow.onnx |
570 MB | One guided Euler step of the acoustic model, fp16 with fp32 islands. x [1, T, 100], t [1], dt [1], ctx [2, L, 768], tmask [2, L] bool, prosody [1, 6], guidance [1], rescale [1] -> x_next [1, T, 100] |
vocoder.onnx |
252 MB | Mel denormalization and BigVGAN v2 (24 kHz, 100 bands, 256x), fp16 with fp32 islands. mel [1, T, 100] -> audio [1, T * 256] |
meta.json |
2 KB | Character vocabulary, audio settings, inference recipe v2, prosody presets |
Inputs and outputs are fp32 in every graph. SHA-256:
4010aedf121ac5e5356f03484d6fab1b01f4a68e844312428a7756c9d79035c5 text.onnx
016a6ea4f9436f77dae24b9aa4b3b9c03b5bee7ad62512d9c7cd07372c855caf flow.onnx
d7e90d81bc18cea1be5aa50d84cedd51daabe092171b199902a22fa19edbd46f vocoder.onnx
a91fb9ea1cadc0c56536f286fbb5207841ac0ff6a60645d43c47af15bbe69efd meta.json
Changes made to the original model
As required by paragraph 4 of the license, these are the modifications:
- The EMA weights of
cloud0day3/antalia-1(revisioneaec2aad) were converted to ONNX (opset 17) and split into three graphs. Attention is written out explicitly instead of usingnn.MultiheadAttention; the math is unchanged. - The released voice (
voicedata-candidate-b) is baked intoflow.onnx: its speaker embedding is a constant and the other 1,501 speaker ids are not included. Classifier-free text guidance, guidance rescale, the Euler update and the ±5 mel clamp run inside the graph; the conditioned and text-free passes share one batch-2 run. flow.onnxis fp16 except the output projection and everything after it, the sinusoidal angles, LayerNorm and Softmax, which stay fp32.vocoder.onnxadds the mel denormalization (mean −7.139, std 2.791) in front of BigVGAN, with weight norm removed and the anti-aliasing filters stored pre-expanded per channel. It is fp16 except the snake activations'Sinand everyConvTranspose, which give wrong output in fp16 on WebGPU.- Checked against the PyTorch model on the same noise: fp32 ONNX matches to 1e-5 (mel). In Chrome on an Apple GPU, the mel differs from fp32 by 8 % RMS, and the audio's log-spectral distance to the fp32 reference is 1.7, against 4.6 for a different noise seed.
Not included from the original recipe: best-of-8 selection (it needs Whisper and WavLM) and noise-envelope pinning
(listed in inference-recipe.json but absent from the released code).
Use
See the browser demo's source for a complete client: text normalization (a JavaScript port of
turkish_tts/normalize.py), clause chunking at ≤120 characters, the frame floor of 0.085 s per character, the
sway −0.8 time grid, and the sampling loop.
- Normalize and lowercase the text, map characters to ids with
meta.json'svocab, and drop unknown ones. text.onnxon the ids, and once on[1](<unk>) for the text-free context.T = max(round(exp(log_frames)), ceil(letters * 0.085 * 24000 / 256)), start from Gaussian noise[1, T, 100].- Run
flow.onnx16 or 32 times with row 0 ofctxthe text and row 1 the text-free context (masked after its first position),guidance4.0,rescale0.5, prosody frommeta.json. vocoder.onnxon the result gives 24 kHz mono audio.
Credits
- Antalia 1 by Sezgin Saygili, Emre Kaplaner, Oncel Ozgul and Fikri San Koktas (Patientdesk.ai): https://huggingface.co/cloud0day3/antalia-1, https://github.com/0daycloud/antalia. These ONNX files are derived from it, with the changes listed above.
- BigVGAN v2 by NVIDIA, MIT license (LICENSE-BigVGAN).
- The voice belongs to an anonymous voice actor who consented to redistribution of the weights. It must not be presented as her, or as any real person.
License and use restrictions
Antalia OpenRAIL-M, see LICENSE.md. You must give a copy of the license to anyone you redistribute these files to, keep the attribution above, and require your users to follow the use-based restrictions of paragraph 5 and Attachment A, which apply to anything you make with these files. Among them, you may not use the model or its output:
- to impersonate any real person, including the voice actor, or imply that a real person said something they did not say;
- to present output as a genuine human recording, or use it without disclosing that the speech is synthetic where a listener could believe otherwise;
- for fraud, scams, social engineering, or unsolicited automated calls or messages, including political robocalls;
- to generate sexual, violent or harassing content in this voice;
- to create voice-cloning datasets or derivatives presented as the voice of a specific real person;
and for the other uses listed in Attachment A of LICENSE.md, which is the binding text.