File size: 9,945 Bytes
cefb829 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | ---
license: apache-2.0
library_name: onnx
base_model: n4ze3m/tiny-voca
base_model_relation: quantized
pipeline_tag: text-to-speech
language:
- en
tags:
- onnx
- int8
- quantized
- text-to-speech
- tts
- tiny-voca
- edge
- cpu
---
# tiny-voca: INT8 ONNX, 7.7 MB, 60.8x Real-Time CPU Speech
[n4ze3m/tiny-voca](https://huggingface.co/n4ze3m/tiny-voca) (4.54M parameters, two 24 kHz English voices `F2` and `M2`, Apache-2.0) quantized to standard open-weight INT8 `.onnx` files with [Kenosis](https://coreepoch.dev/kenosis/). Both files are calibration-free, drop-in replacements for the upstream 21.39 MB FP32 ONNX graph and run on CPU with stock ONNX Runtime and OpenVINO.
- **`tiny_voca_int8_kenosis.onnx` (7.74 MB, 63.8% smaller than FP32):** Best choice for ONNX Runtime CPU. Runs at 60.8x real time on 1 thread and 108.9x on 4 threads (1.36x to 1.56x lower per-utterance latency than stock ONNX Runtime INT8).
- **`tiny_voca_w8_kenosis.onnx` (7.73 MB, 63.8% smaller than FP32):** Best choice for OpenVINO CPU and exact FP32 accuracy parity. Matches FP32 word error rate exactly (1.00% across 68 utterances on both ONNX Runtime and OpenVINO) and runs at 114.1x real time on OpenVINO with 4 threads.
As of November 23, 2026, no other public INT8 ONNX release of `n4ze3m/tiny-voca` existed on Hugging Face. Both Kenosis INT8 `.onnx` files are smaller than stock ONNX Runtime `quantize_dynamic` (8.12 MB) and smaller than all three quantized upstream GGUF files in `n4ze3m/tiny-voca` (`tiny-voca-js.gguf` 7.99 MB, `tiny-voca-q4_0.gguf` 8.70 MB, and `tiny-voca-q8_0.gguf` 10.86 MB).
## Accuracy
34 English sentences (`eval_sentences.json`) synthesized across both voices (`F2` and `M2`, 68 utterances, 804 normalized words) using the bundled `phonemizer/lexicon.tsv` frontend, transcribed with `faster-whisper` `base.en` (`beam_size=5`, `temperature=0.0`, `EnglishTextNormalizer`). Calibration: none (calibration-free).
| model | size | ONNX Runtime WER (68 clips) | OpenVINO WER (68 clips) |
|---|---:|---:|---:|
| FP32 baseline (`n4ze3m/tiny-voca`) | 21.39 MB | 1.00% (8/804) | 1.00% (8/804) |
| Stock ONNX Runtime `quantize_dynamic` | 8.12 MB | 1.00% (8/804) | 0.87% (7/804) |
| **`tiny_voca_int8_kenosis.onnx`** | **7.74 MB** | **1.24% (10/804)** | **0.87% (7/804)** |
| **`tiny_voca_w8_kenosis.onnx`** | **7.73 MB** | **1.00% (8/804)** | **1.00% (8/804)** |
Stock ONNX Runtime `quantize_static` failed on this model during calibration with a scale error (`scale issue`). Per-voice ONNX Runtime WER is `1.24%` (`F2`) and `1.24%` (`M2`) for `tiny_voca_int8_kenosis.onnx`, and `1.24%` (`F2`) and `0.75%` (`M2`) for `tiny_voca_w8_kenosis.onnx` (matching FP32 on both voices). Because the base `tiny-voca` graph includes a `RandomNormalLike` noise source, repeat runs on the same prompt vary slightly (±1 to 2 words across 68 clips under Whisper).
## Speed
Measured in same-block alternating rounds (5 randomized rounds × 2 repetitions = 10 timed runs per thread count) on a 5.7-second utterance (`"The northern gate is locked, Commander. Take the underground pass, and meet me at the extraction point."`, `5.675–5.749 s` across models) on a processor with AVX-VNNI (`onnxruntime` 1.27.0, `openvino` 2026.2.0).
### ONNX Runtime CPU
| model | 1 thread | 4 threads | per-utterance latency speedup vs stock ORT INT8 |
|---|---:|---:|---|
| FP32 baseline (21.39 MB) | 110.08 ms (51.6x RT) | 56.72 ms (100.1x RT) | — |
| Stock ORT `quantize_dynamic` (8.12 MB) | 126.97 ms (45.3x RT) | 81.21 ms (70.8x RT) | 1.00x |
| **`tiny_voca_int8_kenosis.onnx` (7.74 MB)** | **93.55 ms (60.8x RT)** | **52.20 ms (108.9x RT)** | **1.36x (1t) / 1.56x (4t)** |
| `tiny_voca_w8_kenosis.onnx` (7.73 MB) | 110.07 ms (51.6x RT) | 57.06 ms (99.5x RT) | 1.15x (1t) / 1.42x (4t) |
### OpenVINO CPU
| model | 1 thread | 4 threads | per-utterance latency speedup vs stock ORT INT8 |
|---|---:|---:|---|
| FP32 baseline (21.39 MB) | 125.41 ms (45.2x RT) | 53.09 ms (106.9x RT) | — |
| Stock ORT `quantize_dynamic` (8.12 MB) | 156.91 ms (36.6x RT) | 66.59 ms (86.3x RT) | 1.00x |
| `tiny_voca_int8_kenosis.onnx` (7.74 MB) | 150.52 ms (37.8x RT) | 63.09 ms (90.1x RT) | 1.04x (1t) / 1.06x (4t) |
| **`tiny_voca_w8_kenosis.onnx` (7.73 MB)** | **112.22 ms (50.7x RT)** | **49.85 ms (114.1x RT)** | **1.40x (1t) / 1.34x (4t)** |
### Non-VNNI x86-64 Linux confirmation
Verified on a 2-vCPU non-VNNI x86-64 Linux processor (`onnxruntime` 1.27.0, 3 alternating rounds × 2 repetitions, `dizione` frontend, `~6.0 s` [`5.941–5.995 s`] full utterance, 10 Harvard sentences `F2`) on the equivalent pre-scrub Kenosis 2.5.1 graphs (identical weights and graph topology prior to symbol scrubbing):
| model | 1 thread | 4 threads | WER (10 sentences, F2) |
|---|---:|---:|---:|
| FP32 baseline (21.39 MB) | 139.95 ms (42.5x RT) | 300.57 ms (19.8x RT) | 2.47% (2/81) |
| Stock ORT `quantize_dynamic` (8.12 MB) | 180.45 ms (33.2x RT) | 453.40 ms (13.2x RT) | 1.23% (1/81) |
| **`tiny_voca_int8_kenosis`** | **124.91 ms (47.7x RT)** | **275.30 ms (21.6x RT)** | **2.47% (2/81)** |
| **`tiny_voca_w8_kenosis`** | **142.48 ms (41.9x RT)** | **287.38 ms (20.7x RT)** | **1.23% (1/81)** |
## Run
### Quickstart (ONNX Runtime)
Clone or download this repository, then run:
```bash
pip install onnxruntime numpy soundfile
python run_tts.py "Hello! This is a fast offline voice running on your processor." out.wav F2 ort
```
Or load the ONNX file directly in Python with `dizione` (`pip install git+https://github.com/n4ze3m/dizione`):
```python
import os
from pathlib import Path
from huggingface_hub import snapshot_download
import numpy as np
import onnxruntime as ort
import soundfile as sf
repo = Path(snapshot_download(
"CoreEpoch/tiny-voca-int8-onnx",
allow_patterns=["tiny_voca_int8_kenosis.onnx", "phonemizer/*"],
))
os.environ["DIZIONE_DATA"] = str(repo / "phonemizer")
import dizione
sess = ort.InferenceSession(str(repo / "tiny_voca_int8_kenosis.onnx"), providers=["CPUExecutionProvider"])
phones = dizione.phonemize("Hello! This is a fast offline voice running on your processor.")
audio = sess.run(["audio"], {
"tokens": np.array([phones.ids], dtype=np.int64),
"stress": np.array([phones.stress], dtype=np.int64),
"voice": np.array([0], dtype=np.int64), # 0 = F2, 1 = M2
"speed": np.array([1.0], dtype=np.float32),
"pitch_shift": np.array([0.0], dtype=np.float32),
"pitch_range": np.array([1.0], dtype=np.float32),
})[0][0]
peak = float(np.max(np.abs(audio)))
if peak > 0.99:
audio = audio * (0.99 / peak)
sf.write("out.wav", audio, 24000)
```
### OpenVINO
```bash
pip install openvino numpy soundfile
python run_tts.py "Hello! This is a compact offline voice running on your processor." out_ov.wav M2 openvino
```
```python
import sys
from pathlib import Path
from huggingface_hub import snapshot_download
import numpy as np
import openvino as ov
import soundfile as sf
repo = Path(snapshot_download(
"CoreEpoch/tiny-voca-int8-onnx",
allow_patterns=["tiny_voca_w8_kenosis.onnx", "run_tts.py", "config.json", "phonemizer/*"],
))
sys.path.insert(0, str(repo))
from run_tts import build_feed
core = ov.Core()
compiled = core.compile_model(core.read_model(str(repo / "tiny_voca_w8_kenosis.onnx")), "CPU")
res = compiled.create_infer_request().infer(
build_feed("Hello! This is a compact offline voice running on your processor.", voice="M2", repo_dir=repo)
)
audio = res[compiled.outputs[0]][0]
peak = float(np.max(np.abs(audio)))
if peak > 0.99:
audio = audio * (0.99 / peak)
sf.write("out_ov.wav", audio, 24000)
```
Inputs are `tokens [1, N]` (`int64`), `stress [1, N]` (`int64`), `voice [1]` (`int64`, `0=F2`, `1=M2`), `speed [1]` (`float32`), `pitch_shift [1]` (`float32`), and `pitch_range [1]` (`float32`). Outputs are `audio [1, samples]` (`float32`, 24 kHz) and `durations [1, N]` (`int64`). `run_tts.py` uses `dizione` if installed and falls back to the bundled `phonemizer/lexicon.tsv` and `config.json`. `eval_tts.py` checks 68-utterance accuracy (using the bundled lexicon by default, or `--dizione` if installed) and 10-run single-model latency on `eval_sentences.json`; the speed tables above used same-block alternating rounds across models.
## Integrity & license
- `tiny_voca_int8_kenosis.onnx` (`7,741,234 B`), SHA-256 `0b5e17e57aa0877cb80f4681778376f4a0db98d7300b753161289bc48c2000bd`
- `tiny_voca_w8_kenosis.onnx` (`7,734,418 B`), SHA-256 `019f2010b9d7215958400ddd605a2be0cc609de700204b6d8f8bafa5aa212ee8`
Open-weight model derivatives, scripts (`run_tts.py`, `eval_tts.py`), evaluation sentences (`eval_sentences.json`), and documentation are released under **Apache-2.0** (see `LICENSE` and `NOTICE`). Base model: [n4ze3m/tiny-voca](https://huggingface.co/n4ze3m/tiny-voca) by Muhammed Nazeem ([ORCID 0009-0002-9991-0217](https://orcid.org/0009-0002-9991-0217)), FP32 ONNX opset 17 (`onnx/model.onnx`, SHA-256 `fe6d918791a15b82e37465981d7f27a070e46b46635e5a3482fc8dff87a1ae46`). The bundled `config.json` and `phonemizer/` files are redistributed unmodified from `n4ze3m/tiny-voca` under their respective third-party licenses: CMU Pronouncing Dictionary (`phonemizer/LICENSE.cmudict`, BSD-2-Clause, Carnegie Mellon University) and `WikipediaHomographData` (`phonemizer/LICENSE.homograph-data`, Apache-2.0, Google Inc., Gorman, Mazovetskiy, & Nikolaev 2018). The Apache-2.0 license covers Core Epoch LLC's model derivatives, scripts, evaluation sentences, and documentation only (excluding third-party `phonemizer/` files under their own licenses); it grants no rights in Kenosis, Core Epoch's quantizer, which remains proprietary.
```bibtex
@software{nazeem2026tinyvoca,
author = {Nazeem, Muhammed},
title = {tiny-voca: a 4.5M-parameter two-voice English text-to-speech model},
year = {2026},
url = {https://huggingface.co/n4ze3m/tiny-voca}
}
```
Benchmarks and contact: [coreepoch.dev/kenosis](https://coreepoch.dev/kenosis/) · contact@coreepoch.dev
|