decode.sh 실행 중 발생한 에러에 대한 문의

173 views
Skip to first unread message

dboo

unread,
Sep 14, 2021, 9:33:42 PM9/14/21
to zeroth-help
안녕하세요. 제린이입니다.

이승현님의 도움으로 export.sh를 통해 모델을 뽑아내는것까지는 성공했습니다.

이제 두근두근한 마음으로 decode를 실행하였는데 에러가 발생했고.. 원인을 찾지못하여 문의드립니다.

실행 명령어는 /zeroth/s5/ 디렉토리에서 `./local/decode.sh ./speechDATA/test_data_01/003/104/104_003_0019.flac ./output/model/test/models/korean/zeroth ./output/trans/104` 와 같이 실행하였고 아래 두개의 에러를 뱉었습니다.

1. mfcc.conf를 읽지 못하는 오류

ERROR (online2-wav-nnet3-latgen-faster[5.5.965~1-e6cc1]:ReadConfigFile():parse-options.cc:462) Cannot open config file: /home/ucsit-dl/workspace/zeroth/test/models/korean/zeroth/conf/mfcc.conf

해당 폴더에는 mfcc.conf 파일이 있는데 읽지를 못합니다... 왜일까요...?

2. decode.sh 출력 디렉토리에서 .gz파일이 없어 발생하는 오류

ERROR (lattice-lmrescore[5.5.965~1-e6cc1]:~SequentialTableReaderArchiveImpl():util/kaldi-table-inl.h:678) TableReader: error detected closing archive 'gunzip -c ./output/trans/104/lat.1.gz|'

.gz파일을 찾지못한다는 에러인것 같은데 1번 오류로 인해서 나온 것일까요...?


고수님들 답변 부탁드립니다. 감사합니다. 아래는 로그 전체입니다.

~~~

#### Decoding ####

/home/ucsit-dl/workspace/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster --do-endpointing=false --frames-per-chunk=20 --extra-left-context-initial=0 --online=true --frame-subsampling-factor=3 --config=./output/model/test/models/korean/zeroth/conf/online.conf --verbose=2 --min-active=200 --max-active=7000 --beam=15.0 --lattice-beam=6.0 --acoustic-scale=1.0 --word-symbol-table=./output/model/test/models/korean/zeroth/words.txt ./output/model/test/models/korean/zeroth/final.mdl ./output/model/test/models/korean/zeroth/HCLG.fst ark:spk2utt 'ark,s,cs:wav-copy scp,p:wav.scp ark:- |' 'ark:|lattice-scale --acoustic-scale=10.0 ark:- ark:- | gzip -c >./output/trans/104/lat.1.gz' 

ERROR (online2-wav-nnet3-latgen-faster[5.5.965~1-e6cc1]:ReadConfigFile():parse-options.cc:462) Cannot open config file: /home/ucsit-dl/workspace/zeroth/test/models/korean/zeroth/conf/mfcc.conf


[ Stack-Trace: ]

/home/ucsit-dl/workspace/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x793) [0x7f03257441c3]

/home/ucsit-dl/workspace/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x25) [0x5641f6d491ff]

/home/ucsit-dl/workspace/kaldi/src/lib/libkaldi-util.so(kaldi::ParseOptions::ReadConfigFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x2dc) [0x7f0325821580]

/home/ucsit-dl/workspace/kaldi/src/lib/libkaldi-online2.so(void kaldi::ReadConfigFromFile<kaldi::MfccOptions>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, kaldi::MfccOptions*)+0x30c) [0x7f0327a021b2]

/home/ucsit-dl/workspace/kaldi/src/lib/libkaldi-online2.so(kaldi::OnlineNnet2FeaturePipelineInfo::OnlineNnet2FeaturePipelineInfo(kaldi::OnlineNnet2FeaturePipelineConfig const&)+0x7c3) [0x7f0327a0c9df]

/home/ucsit-dl/workspace/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(main+0x845) [0x5641f6d45976]

/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f03251950b3]

/home/ucsit-dl/workspace/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(_start+0x2e) [0x5641f6d4462e]


kaldi::KaldiFatalError##### LM rescore ####

lattice-lmrescore --lm-scale=-1.0 'ark:gunzip -c ./output/trans/104/lat.1.gz|' 'fstproject --project_output=true ./output/model/test/models/korean/zeroth/G.fst |' ark:- 

lattice-scale --inv-acoustic-scale=11.0 ark:- ark:- 

lattice-add-penalty --word-ins-penalty=0.0 ark:- ark:- 

lattice-lmrescore-const-arpa --lm-scale=1.0 ark:- ./output/model/test/models/korean/zeroth/G.carpa ark:- 

lattice-1best ark:- 'ark:|gzip -c > ./output/trans/104/lmre_lat.1.gz' 

gzip: ./output/trans/104/lat.1.gz: No such file or directory

LOG (lattice-lmrescore[5.5.965~1-e6cc1]:main():lattice-lmrescore.cc:148) Done 0 lattices, failed for 0

WARNING (lattice-lmrescore[5.5.965~1-e6cc1]:Close():kaldi-io.cc:515) Pipe gunzip -c ./output/trans/104/lat.1.gz| had nonzero return status 256

ERROR (lattice-lmrescore[5.5.965~1-e6cc1]:~SequentialTableReaderArchiveImpl():util/kaldi-table-inl.h:678) TableReader: error detected closing archive 'gunzip -c ./output/trans/104/lat.1.gz|'


[ Stack-Trace: ]

/home/ucsit-dl/workspace/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x793) [0x7fb3810761c3]

lattice-lmrescore(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x25) [0x559189ba3a7d]

lattice-lmrescore(kaldi::SequentialTableReaderArchiveImpl<kaldi::LatticeHolder>::~SequentialTableReaderArchiveImpl()+0x180) [0x559189ba759a]

lattice-lmrescore(kaldi::SequentialTableReaderArchiveImpl<kaldi::LatticeHolder>::~SequentialTableReaderArchiveImpl()+0xd) [0x559189ba75ad]

lattice-lmrescore(kaldi::SequentialTableReader<kaldi::LatticeHolder>::~SequentialTableReader()+0x16) [0x559189ba7ba2]

lattice-lmrescore(main+0x14a6) [0x559189b9f5af]

/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fb380ac50b3]

lattice-lmrescore(_start+0x2e) [0x559189b9e04e]


terminate called after throwing an instance of 'kaldi::KaldiFatalError'

  what():  kaldi::KaldiFatalError

LOG (lattice-lmrescore-const-arpa[5.5.965~1-e6cc1]:main():lattice-lmrescore-const-arpa.cc:117) Done 0 lattices, failed for 0

LOG (lattice-scale[5.5.965~1-e6cc1]:main():lattice-scale.cc:107) Done 0 lattices.

LOG (lattice-add-penalty[5.5.965~1-e6cc1]:main():lattice-add-penalty.cc:62) Done adding word insertion penalty to 0 lattices.

LOG (lattice-1best[5.5.965~1-e6cc1]:main():lattice-1best.cc:103) Done converting 0 to best path, 0 had errors.

lattice-best-path --word-symbol-table=./output/model/test/models/korean/zeroth/words.txt ark:- ark,t:- 

lattice-copy 'ark:gunzip -c ./output/trans/104/lmre_lat.1.gz|' ark:- 

LOG (lattice-copy[5.5.965~1-e6cc1]:main():lattice-copy.cc:225) Done copying 0 lattices.

LOG (lattice-best-path[5.5.965~1-e6cc1]:main():lattice-best-path.cc:124) Overall cost per frame is -nan = -nan [graph] + -nan [acoustic] over 0 frames.

LOG (lattice-best-path[5.5.965~1-e6cc1]:main():lattice-best-path.cc:128) Done 0 lattices, failed for 0

~~~

Wenzhe15

unread,
Sep 14, 2021, 11:10:31 PM9/14/21
to zeroth-help
./output/model/test/models/korean/zeroth/conf/{online.conf, ivector_extractor.conf} 두 파일 중 path에 관련 설정이 있는 데 이 부분의 문제인 거처럼 보입니다, 
이 path들을  ./output/model/test/models/korean/zeroth/{conf or ivector_extractor} 형식으로 맞게 수정해서 한 번 테스트해보세요.

dboo

unread,
Sep 15, 2021, 12:08:36 AM9/15/21
to zeroth-help
답변 감사합니다! 해당파일들 열어보니 /zeroth/s5/ 로 되어있어야 하는것들이 /zeroth/에서 바로 하위 디렉토리로 경로가 잡혀있네요..

제가 명령어 호출시에 경로를 잘못 입력해서 그런가봅니다. 감사합니다!
2021년 9월 15일 수요일 오후 12시 10분 31초 UTC+9에 Wenzhe15님이 작성:
Reply all
Reply to author
Forward
0 new messages