k2-fsa / sherpa

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

Offline Transducer input limit #322

Closed KazBrekker1 closed 1 year ago

KazBrekker1 commented 1 year ago

Is there a limit to the audio size passed to the offline_transducer_asr.py script?

I'm using modified_beam_search with beam _size 2 on cpu

csukuangfj commented 1 year ago

It is limited by the amount of CPU RAM you have.

KazBrekker1 commented 1 year ago

When I run the scripts, only one CPU core gets utilized, is there an option to increase the number of CPUs used for the offline transducer?

csukuangfj commented 1 year ago

Yes, please change https://github.com/k2-fsa/sherpa/blob/4756d4ec10c61164eff356190740527993844df3/sherpa/bin/offline_transducer_asr.py#L356-L357

KazBrekker1 commented 1 year ago

ok that helped

Do you think it will be a good idea if these parameters torch.set_num_threads torch.set_num_interop_threads get added to the argparse params?

Thank you.

csukuangfj commented 1 year ago

ok that helped

Do you think it will be a good idea if these parameters torch.set_num_threads torch.set_num_interop_threads get added to the argparse params?

Thank you.

Sure. Would you mind creating a pull-request to add that?

KazBrekker1 commented 1 year ago

Yes of course!