batched-wav-nnet3-cuda decoder support online recognition?

321 views
Skip to first unread message

Anjos

unread,
Aug 17, 2019, 10:43:31 PM8/17/19
to kaldi-help


I find the online2bin/online2-wav-nnet3-latgen-faster.cc is not support GPU.

I also write a  a wrapper to encapsulate the  batched-wav-nnet3-cuda decoder as a service to handle multiple speech-to-text requests(https://groups.google.com/forum/#!topic/kaldi-help/vSzaEGF2XsI).

and the can use.

but I find that batched-wav-nnet3-cuda can not support online recognition?

Daniel Povey

unread,
Aug 17, 2019, 11:17:31 PM8/17/19
to kaldi-help
batched-wav-nnet3-cuda is not designed for onine recognition if by "online recognition" you mean that you are getting each wave file bit by bit in real-time as it is recorded. 

--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/21efc2a9-75e2-4ae5-b8d4-2ea0a1a3e69c%40googlegroups.com.

Anjos

unread,
Aug 18, 2019, 9:58:34 PM8/18/19
to kaldi-help
Hi, Dan,
"online recognition" is mean that  you are getting each the audio byte chunk of wave file bit by bit in real-time as it is recorded

and it is also called steam recognition.

在 2019年8月18日星期日 UTC+8上午11:17:31,Dan Povey写道:
batched-wav-nnet3-cuda is not designed for onine recognition if by "online recognition" you mean that you are getting each wave file bit by bit in real-time as it is recorded. 

On Sat, Aug 17, 2019 at 7:43 PM Anjos <aqh...@gmail.com> wrote:


I find the online2bin/online2-wav-nnet3-latgen-faster.cc is not support GPU.

I also write a  a wrapper to encapsulate the  batched-wav-nnet3-cuda decoder as a service to handle multiple speech-to-text requests(https://groups.google.com/forum/#!topic/kaldi-help/vSzaEGF2XsI).

and the can use.

but I find that batched-wav-nnet3-cuda can not support online recognition?

--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi...@googlegroups.com.

Anjos

unread,
Aug 18, 2019, 10:44:26 PM8/18/19
to kaldi-help
or, I know online2-wav-nnet3-latgen-faster.cc is support the audio byte chunk online.

while (samp_offset < data.Dim()) {
  int32 samp_remaining = data.Dim() - samp_offset;//TODO samp_offset
int32 num_samp = chunk_length < samp_remaining ? chunk_length
: samp_remaining;//TODO the last chunk

SubVector<BaseFloat> wave_part(data, samp_offset, num_samp);//TODO num_samp is the len
feature_pipeline.AcceptWaveform(samp_freq, wave_part);

samp_offset += num_samp;
decoding_timer.WaitUntil(samp_offset / samp_freq);
if (samp_offset == data.Dim()) {
// no more input. flush out last frames
feature_pipeline.InputFinished();
}


and, I find nnet3-latgen-faster-batch.cc support GPU. but if support online as above so.



在 2019年8月18日星期日 UTC+8上午11:17:31,Dan Povey写道:
batched-wav-nnet3-cuda is not designed for onine recognition if by "online recognition" you mean that you are getting each wave file bit by bit in real-time as it is recorded. 

On Sat, Aug 17, 2019 at 7:43 PM Anjos <aqh...@gmail.com> wrote:


I find the online2bin/online2-wav-nnet3-latgen-faster.cc is not support GPU.

I also write a  a wrapper to encapsulate the  batched-wav-nnet3-cuda decoder as a service to handle multiple speech-to-text requests(https://groups.google.com/forum/#!topic/kaldi-help/vSzaEGF2XsI).

and the can use.

but I find that batched-wav-nnet3-cuda can not support online recognition?

--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi...@googlegroups.com.

Daniel Povey

unread,
Aug 18, 2019, 10:44:29 PM8/18/19
to kaldi-help
Hm.  In that case I would not really recommend the 'batched' version for now.  I'm think NVidia might at some point modify it to be more compatible with online scenarios, though.


To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/2e869235-84b0-4a02-ab63-83e38552873c%40googlegroups.com.

Anjos

unread,
Aug 18, 2019, 11:13:30 PM8/18/19
to kaldi-help
┭┮_┭┮, I haven't understanded the thread queue in batched-threaded-nnet3-cuda-pipeline.cc. Why use mutex ?

the decode fst and the am_nnet,Where are the calculations used separately?


在 2019年8月19日星期一 UTC+8上午10:44:29,Dan Povey写道:

Hugo Braun

unread,
Aug 19, 2019, 7:02:53 PM8/19/19
to kaldi-help
Mutexes are used internally to protect shared data.
Reply all
Reply to author
Forward
0 new messages