k2-fsa / sherpa

Speech-to-text server framework with next-gen Kaldi
https://k2-fsa.github.io/sherpa
Apache License 2.0
521 stars 105 forks source link

Fix streaming zipformer #362

Closed csukuangfj closed 1 year ago

csukuangfj commented 1 year ago

It has been using torchscript models exported by torch.jit.trace() for streaming zipformer.

The issue is that when people want to run the model on GPU, they have to re-export the model using CUDA as the default exported model runs only on CPU.

This PR supports using torch.jit.script() models for streaming zipformer so that users can run the same model both on CPU and GPU.


Hint:

csukuangfj commented 1 year ago

It requires https://github.com/k2-fsa/icefall/pull/1004