FST was not functional

795 views
Skip to first unread message

Ana Montalvo

unread,
Oct 5, 2016, 9:11:22 AM10/5/16
to kaldi-help
Hi all,

I am having this problem while runing utils/mkgraph.sh , exactly here:
 
...
62    if [[ ! -s $lang/tmp/LG.fst || $lang/tmp/LG.fst -ot $lang/G.fst || \
63        $lang/tmp/LG.fst -ot $lang/L_disambig.fst ]]; then
64        fsttablecompose $lang/L_disambig.fst $lang/G.fst | fstdeterminizestar --use-log=true | \
65        fstminimizeencoded | fstarcsort --sort_type=ilabel > $lang/tmp/LG.fst || exit 1;
66        fstisstochastic $lang/tmp/LG.fst || echo "[info]: LG not stochastic."
67   fi
...

in terminal:

===== MONO DECODING =====

fsttablecompose /home/ana/Desktop/kaldi/kaldi-trunk/egs/wsjcam0/data/lang/L_disambig.fst /home/ana/Desktop/kaldi/kaldi-trunk/egs/wsjcam0/data/lang/G.fst
fstminimizeencoded
fstdeterminizestar --use-log=true
DeterminizerStar: FST was not functional -> not determinizable
Non-functional FST: cannot determinize.
ERROR: FstHeader::Read: Bad FST header: -
ERROR (fstminimizeencoded:ReadFstKaldi():fstext/fstext-utils-inl.h:1273) Reading FST: error reading FST header from standard input
ERROR (fstminimizeencoded:ReadFstKaldi():fstext/fstext-utils-inl.h:1273) Reading FST: error reading FST header from standard input

[stack trace: ]
kaldi::KaldiGetStackTrace()
kaldi::KaldiErrorMessage::~KaldiErrorMessage()
fst::ReadFstKaldi(std::string)
fstminimizeencoded(main+0x1b8) [0x46d305]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fd9d326ef45]
fstminimizeencoded() [0x46d089]

ERROR: FstHeader::Read: Bad FST header: standard input


which could be the reason? What should I check?
thx guys!!
ana

Daniel Povey

unread,
Oct 5, 2016, 1:52:48 PM10/5/16
to kaldi-help
Normally that would happen if you had not put in disambiguation
symbols (#1, #2 etc.) into the lexicon, or had not done so correctly.
It might also happen if there were empty pronunciations in the
lexicon, but I think the scripts check for that.

I have an issue up here https://github.com/kaldi-asr/kaldi/issues/1074
to remind us to add the feature to check that there are no cycles with
no phones on, in L.fst or L_disambig.fst... this would be caused by
having empty pronunciations in the lexicon; however, if you used the
standard prepare_lang.sh, this should not happen anyway.


Dan
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.

Ana Montalvo

unread,
Oct 5, 2016, 4:32:16 PM10/5/16
to kaldi...@googlegroups.com
Thankyou so much, but I am still stucked...

The initial lexicon.txt doesn't have any disambg symbol, but I do use
standard prepare_lang.sh and it creates L_disambig.fst which is used
by mkgraph.sh

So... what am I doing wrong?
> You received this message because you are subscribed to a topic in the
> Google Groups "kaldi-help" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/kaldi-help/ulj4EE6YsOM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Daniel Povey

unread,
Oct 5, 2016, 4:33:50 PM10/5/16
to kaldi-help
Firstly, make sure your code and scripts are up to date ("git pull").
If it still doesn't work, send me separately an archive containing
your lexicon.
Reply all
Reply to author
Forward
0 new messages