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 (revision eaec2aad) were converted to ONNX (opset 17) and split into three graphs. Attention is written out explicitly instead of using nn.MultiheadAttention; the math is unchanged.
  • The released voice (voicedata-candidate-b) is baked into flow.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.onnx is fp16 except the output projection and everything after it, the sinusoidal angles, LayerNorm and Softmax, which stay fp32.
  • vocoder.onnx adds 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' Sin and every ConvTranspose, 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.

  1. Normalize and lowercase the text, map characters to ids with meta.json's vocab, and drop unknown ones.
  2. text.onnx on the ids, and once on [1] (<unk>) for the text-free context.
  3. T = max(round(exp(log_frames)), ceil(letters * 0.085 * 24000 / 256)), start from Gaussian noise [1, T, 100].
  4. Run flow.onnx 16 or 32 times with row 0 of ctx the text and row 1 the text-free context (masked after its first position), guidance 4.0, rescale 0.5, prosody from meta.json.
  5. vocoder.onnx on the result gives 24 kHz mono audio.

Credits

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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ozcancelik/antalia-1-onnx

Quantized
(1)
this model