VietNote-Zipformer-78M-Streaming
CPU speech recognition with code-switching
2 min read
This is a compact automatic speech recognition (ASR) model built on the Zipformer architecture (78M parameters) for Vietnamese with English code-switching. It runs in streaming mode and is tuned to run directly on standard CPUs, including mobile devices and single-board computers. It holds its own against commercial cloud APIs on foreign words in live speech, making it useful for voice assistants, live captions, and local transcription tools.
Key features
- Code-switching support: catches roughly 75% of English words inside Vietnamese speech.
- Streaming mode: processes audio in 640 ms chunks for real-time use.
- CPU execution: runs smoothly via sherpa-onnx on desktops, phones, and Raspberry Pi.
- Small footprint: takes about 274 MB in fp32 and 83 MB quantized to int8.
What you can do
- Add on-device voice input to mobile or desktop apps without sending audio to the cloud.
- Set up live captioning for streams or video calls.
- Build a local transcription bot for recordings mixed with English terms.
Example
import sherpa_onnx, soundfile as sf
rec = sherpa_onnx.OnlineRecognizer.from_transducer(
encoder="models/streaming/int8/encoder.int8.onnx",
decoder="models/streaming/int8/decoder.int8.onnx",
joiner="models/streaming/int8/joiner.int8.onnx",
tokens="models/tokens.txt", num_threads=2,
decoding_method="modified_beam_search", max_active_paths=4)
audio, sr = sf.read("audio.wav", dtype="float32")
s = rec.create_stream()
s.accept_waveform(sr, audio)
s.input_finished()
while rec.is_ready(s):
rec.decode_stream(s)
print(rec.get_result(s))Read more
DetailsArchitecture: Zipformer2, stateless transducer, pruned RNN-T loss
Parameters: 77.7M (78M)
Training: ~1,500 hours of data, 45 epochs
Benchmarks: SyER 13.87 on VietMed, 6.88 on FLEURS+VIVOS
Limitations: weaker on regional accents and spontaneous multi-speaker speech










Comments