Reza2kn's picture
Shenava Rizeh v1.6
3cb81ea verified
|
Raw History Blame Contribute Delete
3.19 kB
metadata
language:
  - fa
  - en
license: gpl-3.0
library_name: coreml
pipeline_tag: automatic-speech-recognition
tags:
  - persian
  - farsi
  - asr
  - zipformer
  - transducer
  - shenava
  - coreml
  - ios
  - streaming
base_model: Reza2kn/Shenava-Rizeh-v1.6

๐ŸŽ™๏ธ Shenava-Rizeh-v1.6-CoreML-iOS15-fp16 (streaming)

A cache-aware streaming Core ML export of Shenava Rizeh v1.6, for live captions on iOS 15+ / macOS 12+.

  • Format: NeuralNetwork with fp16 weights.
  • Each encoder call takes 320 ms of audio and returns 8 frames.
  • Attention looks back 2.56 s, and every cache is an explicit input and output.

It has the same interface as the v1.5 streaming repo; only the file names change from v1_5 to v1_6.

Encoder step Target Size Checked on an M2
shenava_rizeh_v1_6_encoder_streaming_c16_l128_ios15_fp16.mlmodel iOS 15+ 114 MB โœ… tokens identical to onnxruntime
shenava_rizeh_v1_6_encoder_streaming_c16_l128_ios15_int8.mlmodel iOS 15+, int8 weights 58 MB โœ… tokens identical
ios18/shenava_rizeh_v1_6_encoder_streaming_c16_l128_ios18_int4.mlpackage iOS 18+, int4 (blocks of 32) 35 MB โœ… tokens identical

The decoder and joiner (*_ios15_fp16.mlmodel) are shared by all three encoders.

Accuracy: the identical ONNX streaming graph scores TT 5.24 (fp32), 5.25 (int8) and 5.34 (int4) on the held-out half, no LM. v1.5 scored 5.31 / 5.32 / 5.22.

Speed: v1.5 measured about 16 ms per step on the M2 (fp16), and the graph is the same.

Streaming loop

  1. Compute 80-dim kaldi fbank (same settings as the fp16 repo).
  2. Each step, feed 45 frames and advance 32.
  3. Feed every new_<cache> back in. The caches start at zero, and processed_lens is int32 (..._manifest.json lists the shapes).
  4. Run greedy RNN-T per output frame:
    • Blank is 0 and the context is the last 2 tokens, starting at [0, 0].
    • Mask ids 32โ€“1055.
  5. Append about 0.8 s of silence at the end of speech.

run_coreml_stream.py [encoder] and reference/ are the Mac check. The export scripts (export_coreml_stream.py, dj_ios15.py, cmq2.py) rebuild every file.

All formats

License

GPL-3.0, inherited from tinyasr.