Slow decoding

333 views
Skip to first unread message

Marios Xrysopoulos

unread,
May 26, 2019, 2:32:36 PM5/26/19
to kaldi-help
Hello,
I'm pretty new with Kaldi and I'm working with the "Kaldi for dummies" tutorial described in Kaldi's website. Everything works ok but it seems that the decoding process takes too long! Decoding even a single sound file takes ~4 seconds and my professor (I'm and undergraduate student) thinks that's way too long, even accounting for the fact that the machine I'm working on is a bit old (it's running Ubuntu 14.04). Is this normal for Kaldi or maybe I'm doing something wrong? Is there some way to speed things up?

Also, any pointers describing the way Kaldi actually works (without too much math and coding) would be appreciated!

Thanks a lot in advance!

Marios

Daniel Povey

unread,
May 26, 2019, 3:41:45 PM5/26/19
to kaldi-help
If you are decoding just one file, probably the time is dominated by loading the model and the graph.
The idea is you do a bunch, in a batch.

--
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 post to this group, send email to kaldi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/2745cd15-789e-41f5-aa5b-665a24711854%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marios Xrysopoulos

unread,
May 26, 2019, 4:15:26 PM5/26/19
to kaldi-help
Hi, 
that makes a lot of sense as I seem to recall that when I was originally testing the project and decoding more files simultaneously it seemed to require as much time as later when I was decoding a single file.

Loading the model and the graph is performed by the utils/mkgraph.sh script?
As I'm trying to create a "live" (as in I speak a number and the corresponding word is displayed on screen) demo, would it be safe to assume that I could run utils/mkgraph.sh once and then run steps/decode.sh for every sound file I create?


On Sunday, May 26, 2019 at 10:41:45 PM UTC+3, Dan Povey wrote:
If you are decoding just one file, probably the time is dominated by loading the model and the graph.
The idea is you do a bunch, in a batch.

On Sun, May 26, 2019 at 2:32 PM Marios Xrysopoulos <chr...@gmail.com> wrote:
Hello,
I'm pretty new with Kaldi and I'm working with the "Kaldi for dummies" tutorial described in Kaldi's website. Everything works ok but it seems that the decoding process takes too long! Decoding even a single sound file takes ~4 seconds and my professor (I'm and undergraduate student) thinks that's way too long, even accounting for the fact that the machine I'm working on is a bit old (it's running Ubuntu 14.04). Is this normal for Kaldi or maybe I'm doing something wrong? Is there some way to speed things up?

Also, any pointers describing the way Kaldi actually works (without too much math and coding) would be appreciated!

Thanks a lot in advance!

Marios

--
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,
May 26, 2019, 4:34:40 PM5/26/19
to kaldi-help
Hi, 
that makes a lot of sense as I seem to recall that when I was originally testing the project and decoding more files simultaneously it seemed to require as much time as later when I was decoding a single file.

Loading the model and the graph is performed by the utils/mkgraph.sh script?

There is just one graph, it wouldn't depend on the wav file.
 
As I'm trying to create a "live" (as in I speak a number and the corresponding word is displayed on screen) demo, would it be safe to assume that I could run utils/mkgraph.sh once and then run steps/decode.sh for every sound file I create?

Using that workflow you would have to run steps/decode.sh, but in general it would be best to use a server, e.g. see online2-tcp-nnet3-decode-faster as a kind of example.  That would only work with nnet3 models, of course; I don't know what kind of model you were using.

Dan

 


On Sunday, May 26, 2019 at 10:41:45 PM UTC+3, Dan Povey wrote:
If you are decoding just one file, probably the time is dominated by loading the model and the graph.
The idea is you do a bunch, in a batch.

On Sun, May 26, 2019 at 2:32 PM Marios Xrysopoulos <chr...@gmail.com> wrote:
Hello,
I'm pretty new with Kaldi and I'm working with the "Kaldi for dummies" tutorial described in Kaldi's website. Everything works ok but it seems that the decoding process takes too long! Decoding even a single sound file takes ~4 seconds and my professor (I'm and undergraduate student) thinks that's way too long, even accounting for the fact that the machine I'm working on is a bit old (it's running Ubuntu 14.04). Is this normal for Kaldi or maybe I'm doing something wrong? Is there some way to speed things up?

Also, any pointers describing the way Kaldi actually works (without too much math and coding) would be appreciated!

Thanks a lot in advance!

Marios

--
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.
To post to this group, send email to kaldi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/2745cd15-789e-41f5-aa5b-665a24711854%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to kaldi...@googlegroups.com.

Marios Xrysopoulos

unread,
May 28, 2019, 7:12:11 AM5/28/19
to kaldi-help
Will do, thanks!
Reply all
Reply to author
Forward
0 new messages