Help with lookahead graphs

116 views
Skip to first unread message

mjcanovicente

unread,
Nov 11, 2020, 9:46:14 AM11/11/20
to kaldi...@googlegroups.com
Hello everybody

It is the first time I don't find the solution to my problem in the group so I need to open a new issue.

I am trying to do lookahead decoding in order to be able to change my decoding graph on-the-fly. My graph might be a composition of a language model (trigram) and some kind of minor graphs for commands. It is this second part which can be changing.

Firstly I tried to follow 

but once I compose CL.fst and Ha.fst I can't make fstdeterminizestar over the composition. I run out of memory (64 GB). Even if I try to reduce my LM to 5.8MB (almost sure it is not enough in my case, just for trying)

Now, I am struggling with the steps in 

https://github.com/opendcd/opendcd/blob/master/script/makegraphotf.sh


where Ha.fst is made determinizable previously to the composition with CL.fst. However I also get an error:

FST was not functional, not determinizable.

Some clues:
I am using the tree and final.mdl from my GMM trained with SAT,
I used these parameters: tscale=1.0 loopscale=0.1

Thank you in advance for your help!

--
M.José

mjcanovicente

unread,
Nov 12, 2020, 3:35:58 AM11/12/20
to kaldi...@googlegroups.com
As I didn't get any answer (I know it wasn't a lot of time) I will try to be more specific: 
Why can't I do fstdeterminize neither fstdeterminizestar over my Ha.fst as in 

https://github.com/opendcd/opendcd/blob/master/script/makegraphotf.sh

make-h-transducer --disambig-syms-out=$dir/disambig_tid.int  ${dir}/ilabels_${N}_${P}  ${model}/tree  ${model}/final.mdl  > ${dir}/Ha.fst 
fstdeterminize ${dir}/Ha.fst > ${dir}/det.Ha.fst

The error with fstdeterminize says:
FATAL: StringWeight::Plus: Unequal arguments (non-functional FST?) w1 = 138919 w2 = 138918

The error with fstdeterminizestar says:
ERROR (fstdeterminizestar[5.5.689~1-2c7e7]:AddOneElement():fstext/determinize-star-inl.h:791) FST was not functional -> not determinizable.

Thank you again

--
M.José

nshm...@gmail.com

unread,
Nov 12, 2020, 4:31:32 AM11/12/20
to kaldi-help
This whole thing is not very stable for standard GMM model topology, but it should work for chain models.

I suggest you to skip experiments with GMM and train chain nnet3 model instead, GMM accuracy is not relevant anyway.

mjcanovicente

unread,
Nov 12, 2020, 9:17:52 AM11/12/20
to kaldi...@googlegroups.com
Thank you for your help.

Regretfully it wasn't the solution to my problem. I have already try with final.mdl and tree from my chain tdnnlstm and I am also stuck.

Trying to do fstdeterminize to the Ha.fst I get:
FATAL: StringWeight::Plus: Unequal arguments (non-functional FST?) w1 = 4854 w2 = 4634

and with fstdeterminizestar:
ERROR (fstdeterminizestar[5.5.689~1-2c7e7]:ProcessTransition():fstext/determinize-star-inl.h:1007) FST was not functional -> not determinizable

Other question is,  is it necessary to do this step? because 
didn't use it.
Following this steps I run out the memory.

Thank you all

--
Go to http://kaldi-asr.org/forums.html to find out how to join the kaldi-help group
---
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/0584ab40-215c-4da6-9734-99ef26553045n%40googlegroups.com.


--
M.José

nshm...@gmail.com

unread,
Nov 12, 2020, 3:48:52 PM11/12/20
to kaldi-help
> Other question is,  is it necessary to do this step? because 
didn't use it.

You should closely follow mkgraph_lookahead script since it is specifically designed for kaldi config. Older scripts are not really relevant to kaldi-specific setup.

> Following this steps I run out the memory.

I suggest you to try first with mini_librispeech setup. Does mini_librispeech work for you? If yes, then you need to figure out what is the difference between your setup and mini_librispeech. Maybe you have empty word in your lexicon, maybe you do not have word boundaries, maybe you build lexicon fst without silence. It is hard to guess.

You can also share your model folder, I will take a look. 
Reply all
Reply to author
Forward
0 new messages