Views
No views yet
Exported and maintained by WaveKat as part of the wavekat-tts voice pipeline.
1pip install -r requirements.txt
2
3# FP32
4python generate_onnx.py --text "Give every small business the voice of a big one." \
5 --instruct "Speak in a warm and friendly female voice" \
6 -o output_fp32.wav
7
8# INT4 (~4x smaller, faster)
9python generate_onnx.py --variant int4 \
10 --text "Give every small business the voice of a big one." \
11 --instruct "Speak in a warm and friendly female voice" \
12 -o output_int4.wav
13
14# Chinese
15python generate_onnx.py --variant int4 --lang chinese \
16 --text "让每一家小企业,都拥有大企业的声音。" \
17 --instruct "Speak in a warm and professional female voice" \
18 -o output_zh.wavText --> [Tokenizer + Embedding Construction] --> inputs_embeds
|
v
[Talker LM] 28 layers, 2048 hidden
predicts codebook group 0
|
v
[Code Predictor] 5 layers, 1024 hidden
predicts groups 1-15
|
v
[Vocoder] single forward pass
16 codebook groups --> 24kHz waveform| Model | Description | FP32 Size | INT4 Size |
|---|---|---|---|
talker_prefill.onnx | Full sequence prefill with KV cache output | 5.3 GB | 1.4 GB |
talker_decode.onnx | Single-step decode with KV cache | 5.3 GB | 1.4 GB |
code_predictor.onnx | Predict codebook groups 1-15 | 440 MB | 322 MB |
vocoder.onnx | Codes to 24kHz waveform | 876 MB | 558 MB |
.
├── config.json # Model config (dimensions, token IDs, language map)
├── tokenizer/ # Text tokenizer (vocab, merges, config)
├── embeddings/ # Pre-extracted embedding weights (.npy)
├── fp32/ # FP32 ONNX models
│ ├── talker_prefill.onnx
│ ├── talker_decode.onnx
│ ├── code_predictor.onnx
│ └── vocoder.onnx
├── int4/ # INT4 weight-only quantized models
│ ├── talker_prefill.onnx
│ ├── talker_decode.onnx
│ ├── code_predictor.onnx
│ └── vocoder.onnx
├── generate_onnx.py # Reference ONNX-only inference script
└── requirements.txt # Inference dependencies1cd tools/qwen3-tts-onnx
2pip install -r requirements.txt
3
4# Export FP32, validate, and quantize INT4
5make all