Supertonic 2 ONNX with fp16 weights

This repository adds half precision (fp16) ONNX weights to onnx-community/Supertonic-TTS-2-ONNX, the Transformers.js export of Supertone/supertonic-2. It is used by the Kanha chat widget to read answers aloud in the browser.

Changes from the base model

  • onnx/*_fp16.onnx and onnx/*_fp16.onnx_data were converted from the fp32 weights with onnxconverter_common.float16 (inputs and outputs kept fp32). The duplicated opset import was merged and each Cast node's target type was aligned with its declared output type so the sessions load in ONNX Runtime Web.
  • The fp32 files, tokenizer, config and voice styles are unchanged copies of the base repository.

The fp16 weights are about 126 MB instead of 262 MB and run on WebGPU. Use the fp32 weights on the CPU (WASM).

Usage

import { pipeline } from "@huggingface/transformers";

const tts = await pipeline("text-to-speech", "Kanha-AI/supertonic-tts-2-fp16-ONNX", {
  device: "webgpu",
  dtype: "fp16",
});
const audio = await tts("<en>This is really cool!</en>", {
  speaker_embeddings: "https://huggingface.co/Kanha-AI/supertonic-tts-2-fp16-ONNX/resolve/main/voices/F1.bin",
  num_inference_steps: 5,
  speed: 1.05,
});

Voices: F1 to F5 and M1 to M5. Languages: en, ko, es, pt, fr.

License

The model is licensed under the BigScience Open RAIL-M License (see LICENSE), including its use-based restrictions, which apply to this derivative and to any further redistribution. The original model is by Supertone.

Downloads last month
24
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Kanha-AI/supertonic-tts-2-fp16-ONNX

Quantized
(7)
this model