Alslamo alaikom my brother <3

#5
by TheGreatQuran2026 - opened

I was trying to export another nemo into a streaming model
can i access your export script ❤️
Also i am waiting for your new zipformer model 😂❤️

wa ʿalaykum as-salām, brother 🤍

It's just NeMo's cache-aware streaming export — no magic. The three lines that matter, after ASRModel.restore_from(...).eval():

m.change_decoding_strategy(decoder_type="ctc")
m.encoder.set_default_att_context_size([70, 13])   # [left, right] context = the streaming look-ahead
m.encoder.export_cache_support = True

Then export through encoder.forward_for_export(...), which exposes the cache I/O so it streams chunk-by-chunk:

  • inputs: audio_signal (B,80,T), length, cache_last_channel (B,17,70,512), cache_last_time (B,17,512,8), cache_last_channel_len (B)
  • outputs: logprobs (B,T,1025), encoded_lengths, and the three *_next cache tensors you feed back in on the next chunk.

Two gotchas that cost me time: set m.preprocessor.featurizer.normalize = "NA" (and in m.cfg.preprocessor) before export so the ONNX doesn't expect per-utterance norm, and [70,13] is the context that matched my latency/accuracy — try [70,0] for lower latency. Happy to share the full export script if useful.

And yes, the zipformer is live now as you know😄 it's a streaming phoneme model (catches tajwīd/pronunciation mistakes, since it has no LM to auto-correct).

no that's enough my brother you did alot 😄 <3 <3

Sign up or log in to comment