sh: 18: ./path.sh: source: not found , ERROR: FstHeader::Read: Bad FST header: data/lang/G.fst

381 views
Skip to first unread message

Lekshmi K.R

unread,
Oct 24, 2017, 10:42:52 AM10/24/17
to kaldi-help
Hi All,

I am still in dilemma. When I ran kaldi/egs/digits/run.sh

I got the following error:

sh: 18: ./path.sh: source: not found
ERROR: FstHeader::Read: Bad FST header: data/lang/G.fst
--> ERROR: fstinfo failed on data/lang/G.fst
--> ERROR: data/lang/G.fst is not ilabel sorted
sh: 18: ./path.sh: source: not found
fstdeterminizestar data/lang/G.fst /dev/null
ERROR: FstHeader::Read: Bad FST header: data/lang/G.fst
ERROR (fstdeterminizestar[5.2.103~1-91d4]:ReadFstKaldi():kaldi-fst-io.cc:35) Reading FST: error reading FST header from data/lang/G.fst

[ Stack-Trace: ]

kaldi::MessageLogger::HandleMessage(kaldi::LogMessageEnvelope const&, char const*)
kaldi::MessageLogger::~MessageLogger()
fst::ReadFstKaldi(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
main
__libc_start_main
_start

--> ERROR: fail to determinize data/lang/G.fst
sh: 18: ./path.sh: source: not found
sh: 18: ./path.sh: source: not found
ERROR: FstHeader::Read: Bad FST header: data/lang/G.fst
--> utils/lang/check_g_properties.pl successfully validated data/lang/G.fst
--> utils/lang/check_g_properties.pl succeeded.
--> Testing determinizability of L_disambig . G
sh: 18: ./path.sh: source: not found
fstdeterminizestar
fsttablecompose data/lang/L_disambig.fst data/lang/G.fst
ERROR: FstHeader::Read: Bad FST header: data/lang/G.fst
ERROR (fsttablecompose[5.2.103~1-91d4]:ReadFstKaldi():kaldi-fst-io.cc:35) Reading FST: error reading FST header from data/lang/G.fst

[ Stack-Trace: ]

kaldi::MessageLogger::HandleMessage(kaldi::LogMessageEnvelope const&, char const*)
kaldi::MessageLogger::~MessageLogger()
fst::ReadFstKaldi(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
main
__libc_start_main
_start

ERROR: FstHeader::Read: Bad FST header: -
ERROR (fstdeterminizestar[5.2.103~1-91d4]:ReadFstKaldi():kaldi-fst-io.cc:35) Reading FST: error reading FST header from standard input

[ Stack-Trace: ]

kaldi::MessageLogger::HandleMessage(kaldi::LogMessageEnvelope const&, char const*)
kaldi::MessageLogger::~MessageLogger()
fst::ReadFstKaldi(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
main
__libc_start_main
_start

--> ERROR: fail to determinize L_disambig . G.  Output is:
ERROR: FstHeader::Read: Bad FST header: standard input

--> ERROR (see error messages above)
prepare_lang.sh: error validating output

===== LANGUAGE MODEL CREATION =====
===== MAKING lm.arpa =====

run.sh: line 88: -wbdiscount: command not found

===== MAKING G.fst =====

cat: data/local/tmp/lm.arpa: No such file or directory
arpa2fst -
ERROR (arpa2fst[5.2.103~1-91d4]:Read():arpa-file-parser.cc:131) line 1 []: \data\ section missing or empty.

[ Stack-Trace: ]

kaldi::MessageLogger::HandleMessage(kaldi::LogMessageEnvelope const&, char const*)
kaldi::MessageLogger::~MessageLogger()
kaldi::ArpaFileParser::Read(std::istream&, bool)
void kaldi::ReadKaldiObject<kaldi::ArpaLmCompiler>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, kaldi::ArpaLmCompiler*)
main
__libc_start_main
_start

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

===== MONO TRAINING =====

steps/train_mono.sh --nj 1 --cmd run.pl data/train data/lang
Usage: steps/train_mono.sh [options] <data-dir> <lang-dir> <exp-dir>
 e.g.: steps/train_mono.sh data/train.1k data/lang exp/mono
main options (for others, see top of script file)
  --config <config-file>                           # config containing options
  --nj <nj>                                        # number of parallel jobs
  --cmd (utils/run.pl|utils/queue.pl <queue opts>) # how to run jobs.
run.sh: line 102: exp/mono: No such file or directory



Where I have mistaken. Please help me to solve the error.

Thanks in Advance
Lekshmi

Jan Trmal

unread,
Oct 24, 2017, 10:49:38 AM10/24/17
to kaldi-help
you probably did some changes to the recipe -- probably deleted the file path.sh or changed the execution rights.
y.

--
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+unsubscribe@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/48094849-b75a-466f-8986-4ca3565814a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Povey

unread,
Oct 24, 2017, 12:07:06 PM10/24/17
to kaldi-help
Replace "source" with "." in path.sh
it is not compatible with the dash shell.
>> 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/48094849-b75a-466f-8986-4ca3565814a5%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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kaldi-help/CAFReZQYnSH2mD7RJyeKKc%3Djdnk2rzXT%2BPygVX7uU65gxSpApow%40mail.gmail.com.

Lekshmi K.R

unread,
Oct 24, 2017, 1:21:45 PM10/24/17
to kaldi-help
thanks Dan
I am able to solve the problem by replacing 'source' with ' .' in 'path.sh'.

But now i am getting a different error message, the message is

--> data/lang/L.fst is olabel sorted
--> data/lang/L_disambig.fst is olabel sorted
--> data/lang/G.fst is ilabel sorted
--> ERROR: data/lang/G.fst is empty
fstdeterminizestar data/lang/G.fst /dev/null
--> data/lang/G.fst is determinizable

--> utils/lang/check_g_properties.pl successfully validated data/lang/G.fst
--> utils/lang/check_g_properties.pl succeeded.
--> Testing determinizability of L_disambig . G
fstdeterminizestar
fsttablecompose data/lang/L_disambig.fst data/lang/G.fst
--> ERROR: fail to determinize L_disambig . G.  Output is:
fst type                                          vector
arc type                                          standard
input symbol table                                none
output symbol table                               none
# of states                                       0
# of arcs                                         0
initial state                                     -1
# of final states                                 0
# of input/output epsilons                        0
# of input epsilons                               0
# of output epsilons                              0
input label multiplicity                          0
output label multiplicity                         0
# of accessible states                            0
# of coaccessible states                          0
# of connected states                             0
# of connected components                         0
# of strongly conn components                     0
input matcher                                     y
output matcher                                    y
input lookahead                                   n
output lookahead                                  n
expanded                                          y
mutable                                           y
error                                             n
acceptor                                          y
input deterministic                               y
output deterministic                              y
input/output epsilons                             n
input epsilons                                    n
output epsilons                                   n
input label sorted                                y
output label sorted                               y
weighted                                          n
cyclic                                            n
cyclic at initial state                           n
top sorted                                        y
accessible                                        y
coaccessible                                      y
string                                            y
weighted cycles                                   n


Can you help me to solve this also.

Regards
Lekshmi

Lekshmi K.R

unread,
Oct 27, 2017, 6:02:11 AM10/27/17
to kaldi-help
Hi All,

I got solutionfor following error.

I solved it by deleting data/lang folder and then re-run run.sh script.
Thanks
Lekshmi

TopWissTv

unread,
Jan 26, 2020, 2:31:48 AM1/26/20
to kaldi-help
how ple

TopWissTv

unread,
Jan 26, 2020, 2:33:34 AM1/26/20
to kaldi-help
how please doing that i get this error

a@a-VirtualBox:~/kaldi-trunk/egs/digits$ ./run.sh

===== PREPARING ACOUSTIC DATA =====


===== FEATURES EXTRACTION =====

steps/make_mfcc.sh --nj 1 --cmd utils/run.pl data/train exp/make_mfcc/train mfcc
utils/validate_data_dir.sh: Successfully validated data-directory data/train
steps/make_mfcc.sh: [info]: no segments file exists: assuming wav.scp indexed by utterance.
utils/run.pl: line 1: parallel/run.pl: No such file or directory
steps/make_mfcc.sh --nj 1 --cmd utils/run.pl data/test exp/make_mfcc/test mfcc
utils/validate_data_dir.sh: Successfully validated data-directory data/test
steps/make_mfcc.sh: [info]: no segments file exists: assuming wav.scp indexed by utterance.
utils/run.pl: line 1: parallel/run.pl: No such file or directory
steps/compute_cmvn_stats.sh data/train exp/make_mfcc/train mfcc
make_cmvn.sh: no such file data/train/feats.scp
steps/compute_cmvn_stats.sh data/test exp/make_mfcc/test mfcc
make_cmvn.sh: no such file data/test/feats.scp

===== PREPARING LANGUAGE DATA =====

utils/prepare_lang.sh data/local/dict <UNK> data/local/lang data/lang
Checking data/local/dict/silence_phones.txt ...
--> reading data/local/dict/silence_phones.txt
--> text seems to be UTF-8 or ASCII, checking whitespaces
--> text contains only allowed whitespaces
--> data/local/dict/silence_phones.txt is OK

Checking data/local/dict/optional_silence.txt ...
--> reading data/local/dict/optional_silence.txt
--> text seems to be UTF-8 or ASCII, checking whitespaces
--> text contains only allowed whitespaces
--> data/local/dict/optional_silence.txt is OK

Checking data/local/dict/nonsilence_phones.txt ...
--> reading data/local/dict/nonsilence_phones.txt
--> text seems to be UTF-8 or ASCII, checking whitespaces
--> text contains only allowed whitespaces
--> data/local/dict/nonsilence_phones.txt is OK

Checking disjoint: silence_phones.txt, nonsilence_phones.txt
--> disjoint property is OK.

Checking data/local/dict/lexicon.txt
--> reading data/local/dict/lexicon.txt
--> text seems to be UTF-8 or ASCII, checking whitespaces
--> text contains only allowed whitespaces
--> data/local/dict/lexicon.txt is OK

Checking data/local/dict/extra_questions.txt ...
--> data/local/dict/extra_questions.txt is empty (this is OK)
--> SUCCESS [validating dictionary directory data/local/dict]

**Creating data/local/dict/lexiconp.txt from data/local/dict/lexicon.txt
utils/prepare_lang.sh: line 502: fstaddselfloops: command not found
ERROR: FstHeader::Read: Bad FST header: standard input

===== LANGUAGE MODEL CREATION =====
===== MAKING lm.arpa =====


===== MAKING G.fst =====

./run.sh: line 82: arpa2fst: command not found

===== MONO TRAINING =====

steps/train_mono.sh --nj 1 --cmd utils/run.pl data/train data/lang exp/mono
steps/train_mono.sh: Initializing monophone system.
steps/train_mono.sh: line 71: feat-to-dim: command not found
error getting feature dimension




 

بتاريخ الثلاثاء، 24 أكتوبر، 2017 5:21:45 م UTC، كتب Lekshmi K.R:

Jan Trmal

unread,
Jan 26, 2020, 4:00:14 AM1/26/20
to kaldi...@googlegroups.com
Was already answered.
Y.

bader Bouchelga

unread,
Jul 9, 2020, 8:29:03 AM7/9/20
to kaldi-help
where ? can send me the link ?


Le dimanche 26 janvier 2020 10:00:14 UTC+1, Yenda a écrit :
Was already answered.
Y.

To unsubscribe from this group and stop receiving emails from it, send an email to kaldi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/06ab7ae4-7a30-4f9e-907d-2b101e765dc4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages