icefall
icefall copied to clipboard
[Help wanted] Exporting updated zipformer to ONNX
https://github.com/k2-fsa/icefall/pull/1058 adds updated zipformer.
However, we only have torch.jit.script()
support for it at present.
We need to export it to onnx so that it can be used in sherpa-onnx
Help from the community is highly appreciated.
The task
We need to support both streaming and non-streaming versions. Specifically, for the streaming version, we need to add the following files:
- export-onnx.py, (See also https://github.com/k2-fsa/icefall/blob/master/egs/librispeech/ASR/pruned_transducer_stateless7_streaming/export-onnx.py)
- onnx_pretrained.py, (See also https://github.com/k2-fsa/icefall/blob/master/egs/librispeech/ASR/pruned_transducer_stateless7_streaming/onnx_pretrained.py)
Please also have a look at https://github.com/k2-fsa/icefall/blob/master/egs/librispeech/ASR/zipformer/export.py
For the non-streaming version, we need to do similar things.
The non-streaming version is easier since it does not need to consider the intermediate states of the model.
TODO
- [ ] Support non-streaming zipformer
- [ ] Support streaming zipformer
I wanna have a try :) Hope I could finish this task in half a month
I wanna have a try :)
Hope I could finish this task in half a month
Thanks!
@kakashidan Thanks for trying. I hope you can complete the task successfully and earlier. All the best.