Closed madkote closed 2 years ago
The pipeline is almost the same as Kaldi. The problem is the audio chunk for feature pipeline and decoding is different. If the audio chunk feed to feature pipeline is less than which required for decoding, the decoding will be blocked.
Is it possible to run wenet runtime (decoder_main, etc, I also have my c++ sample code) in synchronous mode?
Yes, and It's easy to do this. The difference is you should add some function like NumFramesReady() in Kaldi and call it before https://github.com/wenet-e2e/wenet/blob/main/runtime/core/decoder/torch_asr_decoder.cc#L105. If the accumulated frames are enough for one decoding chunk, go ahead, otherwise just return and wait for the next decoding.
Thanks @robin1001 !
Coming from Kaldi experience, I have discovered that C++ implementation is asynchronous.
What is it about:
So, in asynchronous mode (Wenet) is impossible (or almost) to align audio and decoder results. Provided tools in runtime can do the following:
Question Is it possible to run wenet runtime (decoder_main, etc, I also have my c++ sample code) in synchronous mode?
To Reproduce
Expected behavior Receive result from decoder for each audio chunk.