k2-fsa / icefall

https://k2-fsa.github.io/icefall/
Apache License 2.0
884 stars 286 forks source link

[Help wanted] Exporting updated zipformer to ONNX #1094

Open csukuangfj opened 1 year ago

csukuangfj commented 1 year ago

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:

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

kakashidan commented 1 year ago

I wanna have a try :) Hope I could finish this task in half a month

csukuangfj commented 1 year ago

I wanna have a try :)

Hope I could finish this task in half a month

Thanks!

kafan1986 commented 1 year ago

@kakashidan Thanks for trying. I hope you can complete the task successfully and earlier. All the best.