conikud-onnx
Hebrew grapheme-to-phoneme — IPA with stress, from plain unvocalized text.
A single self-contained .onnx file: the wordpiece tokenizer, the chunk
vocabulary and the per-letter phonetic rules all ride inside it as metadata.
pip install git+https://github.com/conikud/conikud-onnx
from conikud_onnx import G2P
g2p = G2P() # downloads conikud_int8.onnx on first use, then cached
g2p.phonemize("קניתי ספר חדש") # kanˈiti sˈefeʁ χadˈaʃ
g2p.phonemize("הוא ספר את הכסף") # hˈu safˈaʁ ʔˈet hakˈesef
Hebrew omits vowels, so spelling alone rarely fixes a reading: ספר is
sˈefeʁ (a book), safˈaʁ (he counted) or sapˈaʁ (a barber). The model
resolves it from sentence context.
Alternatives
alternatives() keeps every word's competing readings instead of collapsing
them to one answer:
g2p.alternatives("הוא ספר את הכסף", k=3)
# ספר -> safˈaʁ 0.62, safˈeʁ 0.25, sapˈaʁ 0.13
Each reading is an exact top-k beam over the chunks each letter may emit, carrying exactly one stress per word — so every variant is a well-formed pronunciation of that spelling, never an arbitrary logit sample.
Files
| File | Size | Notes |
|---|---|---|
conikud_int8.onnx |
669 MB | int8 dynamic quantization of the MatMul weights |
int8 is the right default on CPU. On GPU the quantized matmuls have no native CUDA kernels and fall back across the device boundary, losing more to memory copies than quantization saves — prefer an fp32 export there.
Accuracy
Measured on the 250-sentence internal eval set and on MILIM-Bench:
| int8 | fp32 | |
|---|---|---|
| Eval WER | 9.97% | 9.97% |
| MILIM WER | 16.56% | 16.37% |
| MILIM word accuracy | 83.44% | 83.63% |
| MILIM exact sentence | 71.81% | 72.11% |
Quantization costs at most 0.19pt of word accuracy for a 2.2× smaller file.
Lexicon and training overlap with these evaluation sets has not been audited, so these numbers do not establish a leakage-free comparison against other systems.