Downloads · 30 days
0
Luigi/x-asr-zh-tw-native-itn
x-asr-zh-tw-native-itn is a automatic speech recognition model from Luigi. Use it when you need speech turned into text. It is set up for icefall. The card lists the license as apache-2.0.
A zh-TW–native variant of the trainable X-ASR streaming Zipformer2 transducer. It emits Traditional Chinese + English + punctuation directly (no Simplified→Traditional post-conversion), and ships a deterministic ITN p…
Downloads · 30 days
0
Access
Public
Updated Jun 26, 2026
Repo size
813 MB
Likes
2
Public
Click a slice to open those files.
.pt644 MB · 79%
From the Hugging Face model README
A zh-TW–native variant of the trainable X-ASR streaming Zipformer2 transducer. It emits Traditional Chinese + English + punctuation directly (no Simplified→Traditional post-conversion), and ships a deterministic ITN post-step (spoken numbers → digits). Recognition accuracy is unchanged — the model is the deployed X-ASR with a relabeled/expanded output vocab.
from decode_tw import XasrTW
asr = XasrTW(device="cuda")
text = asr.transcribe(wav_16k_mono_float32)
# 超過二十年 → "超過20年" ; 三千六百元 → "3600元" ; 百分之五十 → "50%" ; 聽/說/妳/黨 native Traditional
| feature | how |
|---|---|
| Native Traditional | the 5000 Chinese tokens are relabeled Simplified→Traditional in tokens_tw.txt, plus 485 contextual-alternate Traditional chars added to the vocab (5000→5498) |
| English | unchanged from X-ASR |
| Punctuation | X-ASR is already a punctuation model (,。?!) |
| ITN | deterministic post-step tw_tokenizer.conservative_itn (cn2an + idiom guards): years/units/percent → digits, idioms (亂七八糟/千萬/十分) preserved |
An acoustic transducer cannot reliably learn Chinese place value (十=×10, 百=×100) from RNN-T alignment — fine-tuning it to emit digits produced wrong numbers (二十→2, 三千六百→36). A deterministic text rule gets it right every time. This mirrors standard production ASR, where ITN is a separate module.
decode_tw.py — one-call decoder (model → Traditional+punct → ITN)xasr_tw_init.pt — the model (160.8M; X-ASR weights, expanded/relabeled output vocab)tokens_tw.txt, vocab_tw.json — the 5498-token Traditional vocab + char/digit mapstw_tokenizer.py — the ITN post-step (conservative_itn) + target tokenizerbuild_xasr_tw.py — reproducible builder (relabel + expand + warm-start from xasr_native.pt)git clone https://github.com/k2-fsa/icefall
export PYTHONPATH=icefall/egs/librispeech/ASR/zipformer:icefall:$PYTHONPATH
pip install lhotse opencc-python-reimplemented cn2an soundfile
python decode_tw.py audio_16k_mono.wav
Recognition is identical to native_strong (the model's acoustic path is untouched): zh-CER ≈ 0.0685, en-WER ≈ 0.040 (punct-stripped). The Traditional relabeling and ITN post-step change only the written form.
Apache-2.0. Built on GilgameshWind/X-ASR-zh-en (X-ASR authors) and
k2-fsa/icefall. ITN via cn2an + OpenCC.