Shenava Rizeh v1.5 β€” sherpa-onnx

Shenava Rizeh v1.5 (60M Zipformer2 RNN-T, Persian + English) exported for sherpa-onnx as an offline (non-streaming) transducer. Runs on Android, iOS, macOS, Windows, Linux and WebAssembly through sherpa-onnx.

File Size
encoder.onnx, decoder.onnx, joiner.onnx fp32 (235 / 5 / 4 MB)
encoder.int8.onnx, decoder.int8.onnx, joiner.int8.onnx int8 dynamic-quantized (68 / 1.3 / 1.1 MB)
tokens.txt 2,080 tokens (shared + English + Persian)

The language vector for Persian (fa) is built into the encoder.

import sherpa_onnx, soundfile as sf
rec = sherpa_onnx.OfflineRecognizer.from_transducer(
    encoder="encoder.int8.onnx", decoder="decoder.int8.onnx", joiner="joiner.int8.onnx",
    tokens="tokens.txt", num_threads=2, decoding_method="modified_beam_search", max_active_paths=4)
x, sr = sf.read("audio.wav", dtype="float32")   # 16 kHz mono
s = rec.create_stream(); s.accept_waveform(sr, x); rec.decode_stream(s)
print(s.result.text)

Parity (held-out tuning half of the PersianASR Triple Threat benchmark, official TT, no LM, beam 4): tinyasr engine 4.309, sherpa-onnx fp32 4.352, sherpa-onnx int8 4.373, sherpa-onnx int4 4.240 (encoder.int4.onnx, MatMulNBits block 32, 46 MB; use it with the fp32 or int8 decoder/joiner). The small gap comes from tinyasr cutting long audio into VAD pieces; sherpa decodes the whole clip. For the best accuracy (in-beam Persian LM, TT 3.79 official on the full benchmark) use the tinyasr build in the main repo.

GPL-3.0-or-later. Base model and engine: dkaraush/tinyasr; original training data primarily YODAS v3 (CC BY 3.0). Export code follows icefall's export-onnx.py; see export_onnx.py in the main repo.

Streaming (online) model: streaming/

A cache-aware streaming encoder for sherpa_onnx.OnlineRecognizer, for live captions (320 ms chunks, 2.56 s left context). Use it with the same decoder*.onnx, joiner*.onnx and tokens.txt from the repo root:

rec = sherpa_onnx.OnlineRecognizer.from_transducer(
    encoder="streaming/encoder.int8.onnx", decoder="decoder.int8.onnx", joiner="joiner.int8.onnx",
    tokens="tokens.txt", num_threads=1, sample_rate=16000, feature_dim=80,
    decoding_method="modified_beam_search")

Scores on the EVEN half (2,758 clips), no LM, official TT:

Mode TT
offline (root files) 4.35
streaming, fp32 5.31
streaming, int8 5.32
streaming, int4 (streaming/encoder.int4.onnx, 41 MB) 5.22

Re-export with streaming/export_onnx_streaming.py model.tzf out 32 128 to get 640 ms chunks (TT 5.19).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Reza2kn/Shenava-Rizeh-v1.5-sherpa-onnx

Quantized
(5)
this model

Space using Reza2kn/Shenava-Rizeh-v1.5-sherpa-onnx 1