decode.sh 실행중 에러

700 views
Skip to first unread message

익명

unread,
Sep 15, 2021, 4:09:39 AM9/15/21
to zeroth-help
./decode.sh 104_003_0664.flac test/models/korean/zeroth /opt/zeroth/s5/test 
이 명령어를 치면 

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

[ Stack-Trace: ]
/opt/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x82c) [0x7f586174a2fa]
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x21) [0x422f53]
/opt/kaldi/src/lib/libkaldi-util.so(kaldi::ParseOptions::ReadConfigFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x227) [0x7f5861c1c1f7]
/opt/kaldi/src/lib/libkaldi-util.so(kaldi::ParseOptions::Read(int, char const* const*)+0x1f7) [0x7f5861c1c983]
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(main+0x6cc) [0x41f80e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f5860852840]
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(_start+0x29) [0x41e639]

kaldi::KaldiFatalError##### LM rescore ####
lattice-lmrescore-const-arpa --lm-scale=1.0 ark:- test/models/korean/zeroth/G.carpa ark:-
lattice-add-penalty --word-ins-penalty=0.0 ark:- ark:-
lattice-lmrescore --lm-scale=-1.0 'ark:gunzip -c /opt/zeroth/s5/test/lat.1.gz|' 'fstproject --project_output=true test/models/korean/zeroth/G.fst |' ark:-
ERROR (lattice-lmrescore-const-arpa[5.5.965~1-e6cc1]:Input():kaldi-io.cc:756) Error opening input stream test/models/korean/zeroth/G.carpa

[ Stack-Trace: ]
/opt/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x82c) [0x7f460bf682fa]
lattice-lmrescore-const-arpa(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x21) [0x4208e1]
/opt/kaldi/src/lib/libkaldi-util.so(kaldi::Input::Input(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool*)+0x9e) [0x7f460c18a962]
lattice-lmrescore-const-arpa(main+0x1a2) [0x41dc98]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f460ad67840]
lattice-lmrescore-const-arpa(_start+0x29) [0x41da29]

kaldi::KaldiFatalErrorlattice-1best ark:- 'ark:|gzip -c > /opt/zeroth/s5/test/lmre_lat.1.gz'
lattice-scale --inv-acoustic-scale=11.0 ark:- ark:-
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.
ERROR: ReadFstClass: Can't open file: test/models/korean/zeroth/G.fst
ERROR: FstHeader::Read: Bad FST header: fstproject --project_output=true test/models/korean/zeroth/G.fst |
ERROR (lattice-lmrescore[5.5.965~1-e6cc1]:ReadFstKaldi():kaldi-fst-io.cc:35) Reading FST: error reading FST header from 'fstproject --project_output=true test/models/korean/zeroth/G.fst |'

[ Stack-Trace: ]
/opt/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x82c) [0x7f8cd46d32fa]
lattice-lmrescore(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x21) [0x44063b]
/opt/kaldi/src/lib/libkaldi-fstext.so(fst::ReadFstKaldi(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)+0x182) [0x7f8cd4b2ee88]
lattice-lmrescore(main+0x21c) [0x43bdd2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f8cd34d2840]
lattice-lmrescore(_start+0x29) [0x43bae9]

WARNING (lattice-lmrescore[5.5.965~1-e6cc1]:Close():kaldi-io.cc:515) Pipe fstproject --project_output=true test/models/korean/zeroth/G.fst | had nonzero return status 256
kaldi::KaldiFatalErrorlattice-copy 'ark:gunzip -c /opt/zeroth/s5/test/lmre_lat.1.gz|' ark:-
lattice-best-path --word-symbol-table=test/models/korean/zeroth/words.txt ark:- ark,t:-
LOG (lattice-copy[5.5.965~1-e6cc1]:main():lattice-copy.cc:225) Done copying 0 lattices.
ERROR: SymbolTable::ReadText: Can't open file test/models/korean/zeroth/words.txt
ERROR (lattice-best-path[5.5.965~1-e6cc1]:main():lattice-best-path.cc:73) Could not read symbol table from file test/models/korean/zeroth/words.txt

[ Stack-Trace: ]
/opt/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x82c) [0x7f53c5e0b2fa]
lattice-best-path(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x21) [0x41bf31]
lattice-best-path(main+0x39a) [0x419250]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f53c4f13840]
lattice-best-path(_start+0x29) [0x418de9]

이렇게 많은 에러들이 발생합니다 ㅠㅠ

이승현

unread,
Sep 15, 2021, 9:35:25 PM9/15/21
to zeroth-help
src_dir로 입력한 test/models/korean/zeroth 아래에 모델 관련 파일들이 제대로 존재하고 있나요?

아예 처음부터 못 찾는 걸 보니 해당 디렉터리 아래에 파일들이 제대로 존재하지 않는 것 같습니다.
2021년 9월 15일 수요일 오후 5시 9분 39초 UTC+9에 wotn...@gmail.com님이 작성:
Message has been deleted

익명

unread,
Sep 16, 2021, 2:39:02 AM9/16/21
to zeroth-help
데이터 훈련 후 모델 파일들이 어디에 있는지 알 수 있을까요?

2021년 9월 16일 목요일 오전 10시 35분 25초 UTC+9에 이승현님이 작성:

이승현

unread,
Sep 16, 2021, 3:10:27 AM9/16/21
to zeroth-help
local/chain/multi_condition/run_tdnn_1n.sh 까지 정상적으로 학습이 완료되셨다고 가정하겠습니다.

local/export.sh 파일을 실행하시면 decode.sh에 필요한 모든 모델 파일들을 한 디렉터리에 복사할 수 있습니다.


2021년 9월 16일 목요일 오후 3시 39분 2초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 16, 2021, 3:52:22 AM9/16/21
to zeroth-help
sh export.sh 이 명령어로 실행시

sh export.sh (model 복사할 경로)
cp: cannot stat '/opt/zeroth/s5/exp/chain_rvb/tree_a/graph_tgsmall/HCLG.fst': No such file or directory
cp: cannot stat '/opt/zeroth/s5/exp/chain_rvb/tree_a/graph_tgsmall/words.txt': No such file or directory
cp: cannot stat '/opt/zeroth/s5/exp/chain_rvb/tree_a/graph_tgsmall/phones.txt': No such file or directory
cp: cannot stat '/opt/zeroth/s5/exp/chain_rvb/tree_a/graph_tgsmall/phones/word_boundary.int': No such file or directory
cp: cannot stat '/opt/zeroth/s5/exp/chain_rvb/tdnn1n_rvb_online/final.mdl': No such file or directory
cp: cannot stat '/opt/zeroth/s5/exp/chain_rvb/tdnn1n_rvb_online/frame_subsampling_factor': No such file or directory
cp: cannot stat '/opt/zeroth/s5/exp/chain_rvb/tdnn1n_rvb_online/ivector_extractor/': No such file or directory
cp: cannot stat '/opt/zeroth/s5/exp/chain_rvb/tdnn1n_rvb_online/conf/': No such file or directory
sed: can't read /opt/zeroth/s5/models//opt/zeroth/s5/models/conf/ivector_extractor.conf: No such file or directory
sed: can't read /opt/zeroth/s5/models//opt/zeroth/s5/models/conf/online.conf: No such file or directory
이런 오류들이 발생합니다 

2021년 9월 16일 목요일 오후 4시 10분 27초 UTC+9에 이승현님이 작성:

이승현

unread,
Sep 16, 2021, 4:15:28 AM9/16/21
to zeroth-help
export.sh 스크립트 내의 final_graph_dir, final_model_dir, small_lm, large_lm의 경로를 변경해주셔야 합니다.
예를 들어 현재 작업하는 디렉터리 경로가
/home/temp/kaldi/egs/zeroth/s5 에서 작업하신다면
exp, 또는 data 이전에 경로를 알맞게 바꿔주시면 됩니다.

'/opt/zeroth/s5/exp/chain_rvb/tree_a/graph_tgsmall/HCLG.fst'를 예시로 들자면
/home/temp/kaldi/egs/zeroth/s5/exp/chain_rvb/tree_a/graph_tgsmall/HCLG.fst 로 바꾸면 됩니다.
2021년 9월 16일 목요일 오후 4시 52분 22초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 16, 2021, 4:42:05 AM9/16/21
to zeroth-help
만약에 오류나는 파일들이 없다면 제대로 학습이 되지 않은건가요?

2021년 9월 16일 목요일 오후 5시 15분 28초 UTC+9에 이승현님이 작성:

익명

unread,
Sep 16, 2021, 4:45:18 AM9/16/21
to zeroth-help
제가 run_openslr.sh로 실행해서 학습을 했는데 이건 상관없을까요?

2021년 9월 16일 목요일 오후 5시 42분 5초 UTC+9에 익명님이 작성:

이승현

unread,
Sep 16, 2021, 4:47:16 AM9/16/21
to zeroth-help
경로를 정상적으로 입력을 했음에도 불구하고 파일 복사가 진행되지 않는다면 모델 파일들이 생성이 안된 것이니 제대로 학습이 되지 않았을 수도 있습니다.

DNN 학습까지 정상적으로 완료가 된 것인가요?
위 경로들은 DNN 학습까지 완료된 경로를 의미합니다.
2021년 9월 16일 목요일 오후 5시 42분 5초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 16, 2021, 4:55:28 AM9/16/21
to zeroth-help
20210916_175445.png
run_openslr.sh 실행했을 때 이 로그가 찍혀있었습니다 !
2021년 9월 16일 목요일 오후 5시 47분 16초 UTC+9에 이승현님이 작성:

익명

unread,
Sep 16, 2021, 8:13:23 PM9/16/21
to zeroth-help
1E31EEE9-C2D0-45A8-A847-A38DDA8021D7.png
혹시 몰라 어제 한번더 run_openslr.sh 실행 후 나온 결과입니다.
2021년 9월 16일 목요일 오후 5시 55분 28초 UTC+9에 익명님이 작성:

이승현

unread,
Sep 16, 2021, 10:19:11 PM9/16/21
to zeroth-help
run_openslr.sh 자체는 문제가 없을테고
로그 중간에도 에러가 없다면 경로가 잘못되었을 수도 있습니다.
export.sh에서 경로와 실제 프로젝트 경로가 일치하는지 확인하셔야 할 것 같습니다.


2021년 9월 17일 금요일 오전 9시 13분 23초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 24, 2021, 3:04:22 AM9/24/21
to zeroth-help
20210924_160311.png
여기서 final_graph_dir 하고 final_model_dir에 있는 파일들만 안뜨네요 뭐가 문제인걸까요 ㅠㅠ G.fst, G.carpa는 경로에 위치해있습니다 
2021년 9월 17일 금요일 오전 11시 19분 11초 UTC+9에 이승현님이 작성:

익명

unread,
Sep 24, 2021, 3:08:14 AM9/24/21
to zeroth-help
혹시 설치방법 같은게 나와있는 곳이 있을까요??

2021년 9월 24일 금요일 오후 4시 4분 22초 UTC+9에 익명님이 작성:

이승현

unread,
Sep 25, 2021, 12:16:12 AM9/25/21
to zeroth-help
해당 경로에 디렉터리들이 있는 것이 맞나요? 만약 있다면 export.sh를 쓰지 않고 직접 복사해보시는 것도 방법입니다.
만약 저 디렉터리들이 없다면 학습이 정상적으로 끝난게 아닐겁니다.
로그 파일 끝 말고 전체 로그 파일을 보내주시거나 직접 로그 파일 중간에 에러같은게 없는지 확인해보세요.
작업하시는 zeroth 디렉터리가 위치한 경로도 알려주시면 좋습니다.

>>>혹시 설치방법 같은게 나와있는 곳이 있을까요??
어떤 설치방법을 말씀하시나요?
2021년 9월 24일 금요일 오후 4시 8분 14초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 26, 2021, 8:08:18 PM9/26/21
to zeroth-help
20210927_090609.png
여기까진 존재하지만 그 뒤에있는 파일들이 없습니다 ! 

설치방법은 zeroth 처음부터 설치방법이 맞는지 궁금해서 설치방법을 여쭤봤습니다.
2021년 9월 25일 토요일 오후 1시 16분 12초 UTC+9에 이승현님이 작성:

이승현

unread,
Sep 26, 2021, 10:02:44 PM9/26/21
to zeroth-help
보내주신 사진으로 보면
적어도 local/chain/multi_condition/run_tdnn_1n.sh에서 stage 14는 실행이 제대로 안 된 것 같습니다.
그런데 final_graph_dir에 있는 파일들도 없다고 하셨으니 stage 13도 제대로 실행이 안 된 것 같구요.
학습까지는 제대로 진행이 되었어도 그래프 생성까지 끝마치셔야 합니다.
한 번 처음부터 다시 해보시는 것도 좋을 것 같습니다.

kaldi는 구글에 kaldi install 치시면 잘 정리되어있을 겁니다. zeroth는 zeroth github의 requirement를 따라가시면 됩니다.
2021년 9월 27일 월요일 오전 9시 8분 18초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 27, 2021, 1:25:36 AM9/27/21
to zeroth-help
run_tdnn_1n.sh 스테이지 13으로 실행을 하면 

+ stage=13
+ nj=10
+ train_set=train_clean
+ num_data_reps=1
+ speed_perturb=true
+ test_sets=test_200
+ gmm=tri4b
+ nnet3_affix=_rvb
+ affix=1n_rvb
+ common_egs_dir=
+ train_stage=-0
+ xent_regularize=0.1
+ max_param_change=2.0
+ get_egs_stage=-10
+ chunk_width=150,110,100
+ num_jobs_initial=2
+ num_jobs_final=7
+ num_epochs=4
+ minibatch_size=128
+ initial_effective_lrate=0.0015
+ final_effective_lrate=0.0002
+ remove_egs=true
+ test_online_decoding=true
+ echo './run_tdnn_1n.sh '
./run_tdnn_1n.sh
+ . ./cmd.sh
++ export 'train_cmd=run.pl --mem 2G'
++ train_cmd='run.pl --mem 2G'
++ export 'decode_cmd=run.pl --mem 4G'
++ decode_cmd='run.pl --mem 4G'
++ export 'mkgraph_cmd=run.pl --mem 8G'
++ mkgraph_cmd='run.pl --mem 8G'
++ export 'normalize_cmd=run.pl --mem 4G'
++ normalize_cmd='run.pl --mem 4G'
++ hostInAtlas='ares hephaestus jupiter neptune'
+++ echo ares hephaestus jupiter neptune
++++ hostname -f
+++ grep -o secuinfo-desktop
++ [[ ! -z '' ]]
+ . ./path.sh
++ export KALDI_ROOT=/opt/kaldi
++ KALDI_ROOT=/opt/kaldi
++ '[' -f /opt/kaldi/tools/env.sh ']'
++ . /opt/kaldi/tools/env.sh
+++ export LIBLBFGS=/opt/kaldi/tools/liblbfgs-1.10
+++ LIBLBFGS=/opt/kaldi/tools/liblbfgs-1.10
+++ export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:/opt/kaldi/tools/liblbfgs-1.10/lib/.libs
+++ LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:/opt/kaldi/tools/liblbfgs-1.10/lib/.libs
+++ export MORFESSOR=/opt/kaldi/tools/morfessor
+++ MORFESSOR=/opt/kaldi/tools/morfessor
+++ export 'PATH=/usr/local/cuda-10.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin$:/opt/kaldi/tools/morfe                                                                                                     ssor/scripts'
+++ PATH='/usr/local/cuda-10.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin$:/opt/kaldi/tools/morfessor/sc                                                                                                     ripts'
+++ export PYTHONPATH=:/opt/kaldi/tools/morfessor
+++ PYTHONPATH=:/opt/kaldi/tools/morfessor
++ export 'PATH=/opt/zeroth/s5/utils/:/opt/kaldi/tools/openfst/bin:/opt/zeroth/s5:/usr/local/cuda-10.1/bin:/usr/local/sbin:/usr/local/bi                                                                                                     n:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin$:/opt/kaldi/tools/morfessor/scripts'
++ PATH='/opt/zeroth/s5/utils/:/opt/kaldi/tools/openfst/bin:/opt/zeroth/s5:/usr/local/cuda-10.1/bin:/usr/local/sbin:/usr/local/bin:/usr/                                                                                                     sbin:/usr/bin:/sbin:/bin:/snap/bin$:/opt/kaldi/tools/morfessor/scripts'
++ '[' '!' -f /opt/kaldi/tools/config/common_path.sh ']'
++ . /opt/kaldi/tools/config/common_path.sh
+++ '[' -z /opt/kaldi ']'
+++ export 'PATH=/opt/kaldi/src/bin:/opt/kaldi/src/chainbin:/opt/kaldi/src/featbin:/opt/kaldi/src/fgmmbin:/opt/kaldi/src/fstbin:/opt/kal                                                                                                     di/src/gmmbin:/opt/kaldi/src/ivectorbin:/opt/kaldi/src/kwsbin:/opt/kaldi/src/latbin:/opt/kaldi/src/lmbin:/opt/kaldi/src/nnet2bin:/opt/ka                                                                                                     ldi/src/nnet3bin:/opt/kaldi/src/nnetbin:/opt/kaldi/src/online2bin:/opt/kaldi/src/onlinebin:/opt/kaldi/src/rnnlmbin:/opt/kaldi/src/sgmm2b                                                                                                     in:/opt/kaldi/src/sgmmbin:/opt/kaldi/src/tfrnnlmbin:/opt/kaldi/src/cudadecoderbin:/opt/zeroth/s5/utils/:/opt/kaldi/tools/openfst/bin:/op                                                                                                     t/zeroth/s5:/usr/local/cuda-10.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin$:/opt/kaldi/tools/morfessor/                                                                                                     scripts'
+++ PATH='/opt/kaldi/src/bin:/opt/kaldi/src/chainbin:/opt/kaldi/src/featbin:/opt/kaldi/src/fgmmbin:/opt/kaldi/src/fstbin:/opt/kaldi/src/                                                                                                     gmmbin:/opt/kaldi/src/ivectorbin:/opt/kaldi/src/kwsbin:/opt/kaldi/src/latbin:/opt/kaldi/src/lmbin:/opt/kaldi/src/nnet2bin:/opt/kaldi/src                                                                                                     /nnet3bin:/opt/kaldi/src/nnetbin:/opt/kaldi/src/online2bin:/opt/kaldi/src/onlinebin:/opt/kaldi/src/rnnlmbin:/opt/kaldi/src/sgmm2bin:/opt                                                                                                     /kaldi/src/sgmmbin:/opt/kaldi/src/tfrnnlmbin:/opt/kaldi/src/cudadecoderbin:/opt/zeroth/s5/utils/:/opt/kaldi/tools/openfst/bin:/opt/zerot                                                                                                     h/s5:/usr/local/cuda-10.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin$:/opt/kaldi/tools/morfessor/scripts                                                                                                     '
++ export LC_ALL=ko_KR.UTF-8
++ LC_ALL=ko_KR.UTF-8
+ . ./utils/parse_options.sh
++ (( argpos=1 ))
++ (( argpos<0 ))
++ true
++ '[' -z '' ']'
++ break
++ '[' '!' -z '' ']'
++ true
+ local/nnet3/multi_condition/run_ivector_common.sh --stage 13 --speed-perturb true --num-data-reps 1 --rvb-affix _rvb
+ cuda-compiled
+ '[' true == true ']'
+ train_set=train_clean_sp
+ gmm_dir=exp/tri4b
+ clean_lat_dir=exp/tri4b_train_clean_sp_lats
+ lat_dir=exp/tri4b_train_clean_sp_lats_rvb1
+ dir=exp/chain_rvb/tdnn1n_rvb
+ train_data_dir=data/train_clean_sp_rvb1_hires
+ train_ivector_dir=exp/nnet3_rvb/ivectors_train_clean_sp_rvb1_hires
+ lores_train_data_dir=data/train_clean_sp
+ tree_dir=exp/chain_rvb/tree_a
+ lang=data/lang_chain
+ '[' -d exp/tri4b_ali_train_clean_sp ']'
+ ali_dir=exp/tri4b_ali_train_clean_sp
+ for f in '$train_data_dir/feats.scp' '$train_ivector_dir/ivector_online.scp' '$lores_train_data_dir/feats.scp' '$gmm_dir/final.mdl' '$                                                                                                     ali_dir/ali.1.gz' '$gmm_dir/final.mdl'
+ '[' '!' -f data/train_clean_sp_rvb1_hires/feats.scp ']'
+ for f in '$train_data_dir/feats.scp' '$train_ivector_dir/ivector_online.scp' '$lores_train_data_dir/feats.scp' '$gmm_dir/final.mdl' '$                                                                                                     ali_dir/ali.1.gz' '$gmm_dir/final.mdl'
+ '[' '!' -f exp/nnet3_rvb/ivectors_train_clean_sp_rvb1_hires/ivector_online.scp ']'
+ for f in '$train_data_dir/feats.scp' '$train_ivector_dir/ivector_online.scp' '$lores_train_data_dir/feats.scp' '$gmm_dir/final.mdl' '$                                                                                                     ali_dir/ali.1.gz' '$gmm_dir/final.mdl'
+ '[' '!' -f data/train_clean_sp/feats.scp ']'
+ for f in '$train_data_dir/feats.scp' '$train_ivector_dir/ivector_online.scp' '$lores_train_data_dir/feats.scp' '$gmm_dir/final.mdl' '$                                                                                                     ali_dir/ali.1.gz' '$gmm_dir/final.mdl'
+ '[' '!' -f exp/tri4b/final.mdl ']'
+ for f in '$train_data_dir/feats.scp' '$train_ivector_dir/ivector_online.scp' '$lores_train_data_dir/feats.scp' '$gmm_dir/final.mdl' '$                                                                                                     ali_dir/ali.1.gz' '$gmm_dir/final.mdl'
+ '[' '!' -f exp/tri4b_ali_train_clean_sp/ali.1.gz ']'
+ for f in '$train_data_dir/feats.scp' '$train_ivector_dir/ivector_online.scp' '$lores_train_data_dir/feats.scp' '$gmm_dir/final.mdl' '$                                                                                                     ali_dir/ali.1.gz' '$gmm_dir/final.mdl'
+ '[' '!' -f exp/tri4b/final.mdl ']'
+ '[' 13 -le 8 ']'
+ '[' 13 -le 9 ']'
+ '[' 13 -le 10 ']'
+ '[' 13 -le 11 ']'
+ '[' 13 -le 12 ']'
+ '[' 13 -le 13 ']'
+ utils/lang/check_phones_compatible.sh data/lang_test_tgsmall/phones.txt data/lang_chain/phones.txt
utils/lang/check_phones_compatible.sh: phone symbol tables data/lang_test_tgsmall/phones.txt and data/lang_chain/phones.txt are not comp                                                                                                     atible.
+ utils/mkgraph.sh --self-loop-scale 1.0 data/lang_test_tgsmall exp/chain_rvb/tree_a exp/chain_rvb/tree_a/graph_tgsmall
utils/mkgraph.sh: exp/chain_rvb/tree_a/graph_tgsmall/HCLG.fst is up to date.
+ true
+ '[' 13 -le 14 ']'
+ steps/online/nnet3/prepare_online_decoding.sh --mfcc-config conf/mfcc_hires.conf data/lang_chain exp/nnet3_rvb/extractor exp/chain_rvb                                                                                                     /tdnn1n_rvb exp/chain_rvb/tdnn1n_rvb_online
steps/online/nnet3/prepare_online_decoding.sh --mfcc-config conf/mfcc_hires.conf data/lang_chain exp/nnet3_rvb/extractor exp/chain_rvb/t                                                                                                     dnn1n_rvb exp/chain_rvb/tdnn1n_rvb_online
steps/online/nnet3/prepare_online_decoding.sh: no such file exp/chain_rvb/tdnn1n_rvb/final.mdl
+ rm exp/chain_rvb/tdnn1n_rvb/.error
+ for data in '$test_sets'
+ wait
++ echo test_200
++ sed s/test_//
+ data_affix=200
++ wc -l
+ nspk=10
+ for lmtype in tgsmall
+ steps/online/nnet3/decode.sh --acwt 1.0 --post-decode-acwt 10.0 --nj 10 --cmd 'run.pl --mem 4G' exp/chain_rvb/tree_a/graph_tgsmall dat                                                                                                     a/test_200 exp/chain_rvb/tdnn1n_rvb_online/decode_tgsmall_test_200
steps/online/nnet3/decode.sh --acwt 1.0 --post-decode-acwt 10.0 --nj 10 --cmd run.pl --mem 4G exp/chain_rvb/tree_a/graph_tgsmall data/te                                                                                                     st_200 exp/chain_rvb/tdnn1n_rvb_online/decode_tgsmall_test_200
steps/online/nnet3/decode.sh: no such file exp/chain_rvb/tdnn1n_rvb_online/conf/online.conf
+ exit 1
+ touch exp/chain_rvb/tdnn1n_rvb/.error
+ '[' -f exp/chain_rvb/tdnn1n_rvb/.error ']'
+ echo './run_tdnn_1n.sh: there was a problem while decoding'
./run_tdnn_1n.sh: there was a problem while decoding
+ exit 1

이렇게 뜨고 종료가 되는데 그룹내 대화에 오류 내용들 검색해도 안나오네요 ㅠㅠ

2021년 9월 27일 월요일 오전 11시 2분 44초 UTC+9에 이승현님이 작성:

이승현

unread,
Sep 27, 2021, 2:54:08 AM9/27/21
to zeroth-help
눈에 띄는 부분들을 꼽아보면,
1. utils/lang/check_phones_compatible.sh: phone symbol tables data/lang_test_tgsmall/phones.txt and data/lang_chain/phones.txt are not compatible.
2. steps/online/nnet3/prepare_online_decoding.sh: no such file exp/chain_rvb/tdnn1n_rvb/final.mdl
3. steps/online/nnet3/decode.sh: no such file exp/chain_rvb/tdnn1n_rvb_online/conf/online.conf
이 세 부분이 있네요.

일단 세 부분이 현재 문제의 원인을 말해주진 않지만 힌트는 주는 것 같습니다.
1번 오류는 해결하지 않아도 진행은 될 겁니다. 대신 문제가 있는 채로 디코딩하면 말도 안 되는 결과가 나옵니다. 정상적으로 진행된다면 원래 나오면 안 되는 오류이기도 합니다.
2번 오류는 DNN 학습 후 생성된 최종 음향 모델을 찾지 못했다는 말인데, 이 역시 정상적으로 DNN 학습이 끝났다면 나올 수 없는 오류입니다.
3번 오류는 2번과 연관이 있습니다. steps/online/nnet3/prepare_online_decoding.sh가 진행이 되지 않아서 발생한 오류입니다.

1번은 어디서 파일이 꼬였다고 쳐도 2번 오류가 나왔다는 것은 확실히 학습이 정상적으로 진행이 안 된 것입니다.
아예 처음부터 학습을 다시 시작하시거나 저번 학습 시의 로그 파일을 훑어보시면 답이 나올 것 같습니다.
2021년 9월 27일 월요일 오후 2시 25분 36초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 27, 2021, 2:59:47 AM9/27/21
to zeroth-help
오늘 저녁쯤 run_openslr.sh 실행후 확인해보고 로그들을 올려드리겠습니다 ! 

2021년 9월 27일 월요일 오후 3시 54분 8초 UTC+9에 이승현님이 작성:
Message has been deleted

이승현

unread,
Sep 28, 2021, 1:46:34 AM9/28/21
to zeroth-help
run_tdnn_1n.sh의 stage 8에서 lang_chain 디렉터리를 생성하는데 이미 이 디렉터리가 존재하면 스크립트가 중단이 되버립니다.
기존의 lang_chain 디렉터리를 잠시 어디로 빼두시던지 삭제하시던지 한 후에 stage 8부터 다시 진행하셔야 할 것 같습니다.


2021년 9월 28일 화요일 오후 1시 19분 50초 UTC+9에 wotn...@gmail.com님이 작성:
로그파일 첨부드립니다. 
스테이지 13 오류날 때처럼 똑같이 오류가 나네요...

2021년 9월 27일 월요일 오후 3시 59분 47초 UTC+9에 익명님이 작성:

익명

unread,
Sep 28, 2021, 7:52:38 PM9/28/21
to zeroth-help
파일의 마지막 줄을 보면  ./run_tdnn_1n.sh: exp/chain_rvb/tree_a/final.mdl already exists, refusing to overwrite it. 이미 파일이 있어서 덮어쓸 수 없다고 하고 종료되었습니다 final.mdl 파일을 삭제하고 다시 실행해보면 될까요?
2021년 9월 28일 화요일 오후 2시 46분 34초 UTC+9에 이승현님이 작성:
zeroth log(2).txt

이승현

unread,
Sep 28, 2021, 9:29:27 PM9/28/21
to zeroth-help
네 final.mdl도 삭제하거나 다른 곳으로 잠시 이동시킨 후 다시 실행하시면 됩니다

2021년 9월 29일 수요일 오전 8시 52분 38초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 28, 2021, 10:18:11 PM9/28/21
to zeroth-help
이렇게 종료가 되었는데 오류 내용을 찾지를 못하겠습니다 ㅠㅠ
2021년 9월 29일 수요일 오전 10시 29분 27초 UTC+9에 이승현님이 작성:
zeroth log(3).txt

익명

unread,
Sep 28, 2021, 10:24:35 PM9/28/21
to zeroth-help
추가로 train log 첨부합니다 !
2021년 9월 29일 수요일 오전 11시 18분 11초 UTC+9에 익명님이 작성:
train.0.2.log

이승현

unread,
Sep 29, 2021, 12:33:59 AM9/29/21
to zeroth-help
run_tdnn_1n.sh에서 train.py로 보내는 파라미터들 중 num_jobs_initial과 num_jobs_final이라는 옵션이 있습니다.
이 두 값은 DNN 학습 중 사용할 GPU의 개수와 관련이 있습니다.
num_jobs_initial은 학습 시작 시 몇 개의 GPU를 사용할지에 대한 옵션입니다.
num_jobs_final은 최종적으로 몇 개까지의 GPU를 사용할지에 대한 옵션입니다.

로그를 보니 각각 2와 7로 값이 매겨져 있습니다.
즉 처음 DNN 학습 시작 시 GPU를 2개부터 사용해서 학습이 진행되면서 하나씩 늘려 최종 7개까지 사용하도록 한 것입니다.

train.0.2.log를 보니 현재 사용가능한 GPU는 1개이니 이 값들을 1로 바꾸셔야 합니다. 그렇지 않으면 위와 같이 사용할 수 있는 GPU를 찾지 못하고 에러가 발생합니다.

만약 이 값을 변경했음에도 비슷한 오류가 발생한다면 train.py로 전달하는 옵션 중 --use-gpu를 true에서 wait로 변경해보시기 바랍니다.

2021년 9월 29일 수요일 오전 11시 24분 35초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 29, 2021, 7:48:57 PM9/29/21
to zeroth-help
어제 정상적으로 학습이 끝났습니다 그럼 export.sh 실행 후 decode.sh 실행하면 될까요?

2021년 9월 29일 수요일 오후 1시 33분 59초 UTC+9에 이승현님이 작성:
Message has been deleted

익명

unread,
Sep 29, 2021, 8:10:13 PM9/29/21
to zeroth-help
#### Decoding ####
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster --do-endpointing=false                                                                                                                                                              --frames-per-chunk=20 --extra-left-context-initial=0 --online=true --frame-subs                                                                                                                                                             ampling-factor=3 --config=/opt/zeroth/s5/models/opt/zeroth/s5/models//conf/onlin                                                                                                                                                             e_cmvn.conf --verbose=2 --min-active=200 --max-active=7000 --beam=15.0 --lattice                                                                                                                                                             -beam=6.0 --acoustic-scale=1.0 --word-symbol-table=/opt/zeroth/s5/models/opt/zer                                                                                                                                                             oth/s5/models//words.txt /opt/zeroth/s5/models/opt/zeroth/s5/models//final.mdl /                                                                                                                                                             opt/zeroth/s5/models/opt/zeroth/s5/models//HCLG.fst ark:spk2utt 'ark,s,cs:wav-co                                                                                                                                                             py scp,p:wav.scp ark:- |' 'ark:|lattice-scale --acoustic-scale=10.0 ark:- ark:-                                                                                                                                                              | gzip -c >/opt/zeroth/s5/test//lat.1.gz'
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:RemoveOrphanNodes():nnet-n                                                                                                                                                             net.cc:948) Removed 1 orphan nodes.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:RemoveOrphanComponents():n                                                                                                                                                             net-nnet.cc:847) Removing 2 orphan components.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:Collapse():nnet-utils.cc:1                                                                                                                                                             488) Added 1 components, removed 2
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:CompileLooped():nnet-compi                                                                                                                                                             le-looped.cc:345) Spent 0.0134869 seconds in looped compilation.
wav-copy scp,p:wav.scp ark:-
lattice-scale --acoustic-scale=10.0 ark:- ark:-
LOG (wav-copy[5.5.971~1-07043]:main():wav-copy.cc:68) Copied 1 wave files
ERROR (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:DecodableNnetLoopedOnlin                                                                                                                                                             eBase():decodable-online-looped.cc:46) Input feature dimension mismatch: got 13                                                                                                                                                              but network expects 40

[ Stack-Trace: ]
/opt/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x8                                                                                                                                                             2c) [0x7f1c8f24b2fa]
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(kaldi::MessageLogger::                                                                                                                                                             LogAndThrow::operator=(kaldi::MessageLogger const&)+0x21) [0x422f53]
/opt/kaldi/src/lib/libkaldi-nnet3.so(kaldi::nnet3::DecodableNnetLoopedOnlineBase                                                                                                                                                             ::DecodableNnetLoopedOnlineBase(kaldi::nnet3::DecodableNnetSimpleLoopedInfo cons                                                                                                                                                             t&, kaldi::OnlineFeatureInterface*, kaldi::OnlineFeatureInterface*)+0x225) [0x7f                                                                                                                                                             1c920e49e7]
/opt/kaldi/src/lib/libkaldi-online2.so(kaldi::SingleUtteranceNnet3DecoderTpl<fst                                                                                                                                                             ::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::SingleUtteranceNnet3Decod                                                                                                                                                             erTpl(kaldi::LatticeFasterDecoderConfig const&, kaldi::TransitionModel const&, k                                                                                                                                                             aldi::nnet3::DecodableNnetSimpleLoopedInfo const&, fst::Fst<fst::ArcTpl<fst::Tro                                                                                                                                                             picalWeightTpl<float> > > const&, kaldi::OnlineNnet2FeaturePipeline*)+0x40) [0x7                                                                                                                                                             f1c92643b46]
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(main+0x10ed) [0x42022f                                                                                                                                                             ]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f1c8e353840]
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(_start+0x29) [0x41e639                                                                                                                                                             ]

LOG (lattice-scale[5.5.971~1-07043]:main():lattice-scale.cc:107) Done 0 lattices                                                                                                                                                             .
kaldi::KaldiFatalError##### LM rescore ####
lattice-1best ark:- 'ark:|gzip -c > /opt/zeroth/s5/test//lmre_lat.1.gz'
lattice-lmrescore-const-arpa --lm-scale=1.0 ark:- /opt/zeroth/s5/models/opt/zero                                                                                                                                                             th/s5/models//G.carpa ark:-
lattice-lmrescore --lm-scale=-1.0 'ark:gunzip -c /opt/zeroth/s5/test//lat.1.gz|'                                                                                                                                                              'fstproject --project_output=true /opt/zeroth/s5/models/opt/zeroth/s5/models//G                                                                                                                                                             .fst |' ark:-
lattice-add-penalty --word-ins-penalty=0.0 ark:- ark:-
lattice-scale --inv-acoustic-scale=11.0 ark:- ark:-
LOG (lattice-lmrescore[5.5.971~1-07043]:main():lattice-lmrescore.cc:148) Done 0                                                                                                                                                              lattices, failed for 0
LOG (lattice-lmrescore-const-arpa[5.5.971~1-07043]:main():lattice-lmrescore-cons                                                                                                                                                             t-arpa.cc:117) Done 0 lattices, failed for 0
LOG (lattice-scale[5.5.971~1-07043]:main():lattice-scale.cc:107) Done 0 lattices                                                                                                                                                             .
LOG (lattice-add-penalty[5.5.971~1-07043]:main():lattice-add-penalty.cc:62) Done                                                                                                                                                              adding word insertion penalty to 0 lattices.
LOG (lattice-1best[5.5.971~1-07043]:main():lattice-1best.cc:103) Done converting                                                                                                                                                              0 to best path, 0 had errors.
lattice-copy 'ark:gunzip -c /opt/zeroth/s5/test//lmre_lat.1.gz|' ark:-
lattice-best-path --word-symbol-table=/opt/zeroth/s5/models/opt/zeroth/s5/models                                                                                                                                                             //words.txt ark:- ark,t:-
LOG (lattice-copy[5.5.971~1-07043]:main():lattice-copy.cc:225) Done copying 0 la                                                                                                                                                             ttices.
LOG (lattice-best-path[5.5.971~1-07043]: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.971~1-07043]:main():lattice-best-path.cc:128) Done 0                                                                                                                                                              lattices, failed for 0

이렇게 되면 정상적으로 실행이 된건가요...?
2021년 9월 30일 목요일 오전 8시 48분 57초 UTC+9에 익명님이 작성:

이승현

unread,
Sep 30, 2021, 12:49:45 AM9/30/21
to zeroth-help
디코딩이 정상적으로 되지 않았습니다.
local/decode.sh에서 online_config이라는 값을 변경하셨나요?
아마 원래 그 값이 $srcdir/conf/online.conf 를 가리켜야 하는데
위의 로그에서는 이 값이 conf/online_cmvn.conf 를 가리키고 있습니다.
그것때문에 디코딩이 되지 않은 것 같습니다.
위 값을 변경한 후 다시 실행해보세요.

2021년 9월 30일 목요일 오전 9시 10분 13초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 30, 2021, 1:06:00 AM9/30/21
to zeroth-help
#### Decoding ####
/opt/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=/opt/zeroth/s5/models/opt/zeroth/s5/models//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=/opt/zeroth/s5/models/opt/zeroth/s5/models//words.txt /opt/zeroth/s5/models/opt/zeroth/s5/models//final.mdl /opt/zeroth/s5/models/opt/zeroth/s5/models//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 >test/lat.1.gz'
ERROR (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:ReadConfigFile():parse-options.cc:462) Cannot open config file: test/models/korean/zeroth/conf/mfcc.conf

[ Stack-Trace: ]
/opt/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x82c) [0x7f127c4832fa]
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x21) [0x422f53]
/opt/kaldi/src/lib/libkaldi-util.so(kaldi::ParseOptions::ReadConfigFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x227) [0x7f127c9551f7]
/opt/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*)+0x1459) [0x7f127f852b57]
/opt/kaldi/src/lib/libkaldi-online2.so(kaldi::OnlineNnet2FeaturePipelineInfo::OnlineNnet2FeaturePipelineInfo(kaldi::OnlineNnet2FeaturePipelineConfig const&)+0x6b4) [0x7f127f85968a]
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(main+0x77e) [0x41f8c0]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f127b58b840]
/opt/kaldi/src/online2bin/online2-wav-nnet3-latgen-faster(_start+0x29) [0x41e639]

kaldi::KaldiFatalError##### LM rescore ####
lattice-lmrescore-const-arpa --lm-scale=1.0 ark:- /opt/zeroth/s5/models/opt/zeroth/s5/models//G.carpa ark:-
lattice-scale --inv-acoustic-scale=11.0 ark:- ark:-
lattice-lmrescore --lm-scale=-1.0 'ark:gunzip -c test/lat.1.gz|' 'fstproject --project_output=true /opt/zeroth/s5/models/opt/zeroth/s5/models//G.fst |' ark:-
lattice-1best ark:- 'ark:|gzip -c > test/lmre_lat.1.gz'
lattice-add-penalty --word-ins-penalty=0.0 ark:- ark:-
LOG (lattice-lmrescore[5.5.971~1-07043]:main():lattice-lmrescore.cc:148) Done 0 lattices, failed for 0
LOG (lattice-lmrescore-const-arpa[5.5.971~1-07043]:main():lattice-lmrescore-const-arpa.cc:117) Done 0 lattices, failed for 0
LOG (lattice-scale[5.5.971~1-07043]:main():lattice-scale.cc:107) Done 0 lattices.
LOG (lattice-add-penalty[5.5.971~1-07043]:main():lattice-add-penalty.cc:62) Done adding word insertion penalty to 0 lattices.
LOG (lattice-1best[5.5.971~1-07043]:main():lattice-1best.cc:103) Done converting 0 to best path, 0 had errors.
lattice-copy 'ark:gunzip -c test/lmre_lat.1.gz|' ark:-
lattice-best-path --word-symbol-table=/opt/zeroth/s5/models/opt/zeroth/s5/models//words.txt ark:- ark,t:-
LOG (lattice-copy[5.5.971~1-07043]:main():lattice-copy.cc:225) Done copying 0 lattices.
LOG (lattice-best-path[5.5.971~1-07043]: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.971~1-07043]:main():lattice-best-path.cc:128) Done 0 lattices, failed for 0

Cannot open config file: test/models/korean/zeroth/conf/mfcc.conf
여기서 이런 오류가 나타나는데 다른 conf파일들은 잘 찾는 것 같은데 mfcc.conf 파일만 못찾는 것 같습니다 왜 그런지 아실까요...?
2021년 9월 30일 목요일 오후 1시 49분 45초 UTC+9에 이승현님이 작성:

이승현

unread,
Sep 30, 2021, 2:07:42 AM9/30/21
to zeroth-help
이 문제는 conf/online.conf 파일 안의 경로들이 잘못 되어서 못 찾는 것입니다.

아마 export.sh를 사용하실 때 맨 마지막 부분에 # replace path info 부분을 보셨을 겁니다.
이 부분에서 conf 파일들 안의 경로들을 일괄적으로 바꿔주는 부분이 있는데
여기서 기본적으로 설정되어 있는 "변경  후 경로 값(replace)"을 각 환경에 맞게 바꿔주셔야 합니다.
초기값이 "test/models/korean/zeroth/" 이런 식으로 되어있습니다.

보내주신 로그 기준으로 이 값을 /opt/zeroth/s5/models/opt/zeroth/s5/models/ 로 바꿔주신 후 다시 export를 실행하면 정상적으로 찾을 것입니다.

그냥 conf 파일들을 직접 수정하셔도 괜찮습니다.
online.conf 파일 열어보시면 --mfcc-config과 --ivector_extraction-config 옵션이 있는데 이 부분들을 해당 conf 파일들이 위치한 적절한 경로로 바꿔주시면 됩니다.

online.conf 파일 이외에 conf/ivector_extractor.conf에도 비슷하게 경로들을 지정한 옵션이 있습니다.
여기는 좀 많은데 online.conf와 같은 방법으로 경로 바꿔주시면 됩니다.
2021년 9월 30일 목요일 오후 2시 6분 0초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 30, 2021, 2:17:38 AM9/30/21
to zeroth-help
#### Decoding ####
/opt/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=/opt/zeroth/s5/models/opt/zeroth/s5/models/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=/opt/zeroth/s5/models/opt/zeroth/s5/models/words.txt /opt/zeroth/s5/models/opt/zeroth/s5/models/final.mdl /opt/zeroth/s5/models/opt/zeroth/s5/models/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 >/opt/zeroth/s5/test/lat.1.gz'
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:ComputeDerivedVars():ivector-extractor.cc:204) Done.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:RemoveOrphanNodes():nnet-nnet.cc:948) Removed 1 orphan nodes.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:RemoveOrphanComponents():nnet-nnet.cc:847) Removing 2 orphan components.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:Collapse():nnet-utils.cc:1488) Added 1 components, removed 2
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:CompileLooped():nnet-compile-looped.cc:345) Spent 0.0151789 seconds in looped compilation.
wav-copy scp,p:wav.scp ark:-
lattice-scale --acoustic-scale=10.0 ark:- ark:-
LOG (wav-copy[5.5.971~1-07043]:main():wav-copy.cc:68) Copied 1 wave files
VLOG[2] (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:GetDiagnosticsAndPrintOutput():online2-wav-nnet3-latgen-faster.cc:59) Likelihood per frame for utterance 000 is 1.49062 over 364 frames, = -1.32555,-2.81617
000 하지만 MOVE 사유카 두른 모두 아즈카반 계열의 지켜 처우 탐욕 술을 권 훈육관 (십) 오 년 이나마 보던 예능 리즈 스탯
VLOG[2] (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:OutputStats():online-timing.cc:106) Latency 0.148203 seconds out of 10.9287, for utterance 000
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:main():online2-wav-nnet3-latgen-faster.cc:296) Decoded utterance 000
VLOG[2] (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:PrintDiagnostics():online-ivector-feature.cc:369) By the end of the utterance, objf change/frame from estimating iVector (vs. default) was 8.72948 and iVector length was 10.0174
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:Print():online-timing.cc:36) Timing stats: real-time factor was 1.01356 (note: this cannot be less than one.)
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:Print():online-timing.cc:38) Average delay was 0.148203 seconds.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:Print():online-timing.cc:42) Percentage of time spent idling was 81.8018
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:Print():online-timing.cc:44) Longest delay was 0.148203 seconds for utterance '000'
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:main():online2-wav-nnet3-latgen-faster.cc:302) Decoded 1 utterances, 0 with errors.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:main():online2-wav-nnet3-latgen-faster.cc:304) Overall likelihood per frame was 1.49062 per frame over 364 frames.
LOG (lattice-scale[5.5.971~1-07043]:main():lattice-scale.cc:107) Done 1 lattices.
##### LM rescore ####
lattice-1best ark:- 'ark:|gzip -c > /opt/zeroth/s5/test/lmre_lat.1.gz'
lattice-add-penalty --word-ins-penalty=0.0 ark:- ark:-
lattice-scale --inv-acoustic-scale=11.0 ark:- ark:-
lattice-lmrescore-const-arpa --lm-scale=1.0 ark:- /opt/zeroth/s5/models/opt/zeroth/s5/models/G.carpa ark:-
lattice-lmrescore --lm-scale=-1.0 'ark:gunzip -c /opt/zeroth/s5/test/lat.1.gz|' 'fstproject --project_output=true /opt/zeroth/s5/models/opt/zeroth/s5/models/G.fst |' ark:-
LOG (lattice-lmrescore[5.5.971~1-07043]:main():lattice-lmrescore.cc:148) Done 1 lattices, failed for 0
LOG (lattice-lmrescore-const-arpa[5.5.971~1-07043]:main():lattice-lmrescore-const-arpa.cc:117) Done 1 lattices, failed for 0
LOG (lattice-scale[5.5.971~1-07043]:main():lattice-scale.cc:107) Done 1 lattices.
LOG (lattice-add-penalty[5.5.971~1-07043]:main():lattice-add-penalty.cc:62) Done adding word insertion penalty to 1 lattices.
LOG (lattice-1best[5.5.971~1-07043]:main():lattice-1best.cc:103) Done converting 1 to best path, 0 had errors.
lattice-copy 'ark:gunzip -c /opt/zeroth/s5/test/lmre_lat.1.gz|' ark:-
lattice-best-path --word-symbol-table=/opt/zeroth/s5/models/opt/zeroth/s5/models/words.txt ark:- ark,t:-
LOG (lattice-copy[5.5.971~1-07043]:main():lattice-copy.cc:225) Done copying 1 lattices.
LOG (lattice-best-path[5.5.971~1-07043]:main():lattice-best-path.cc:99) For utterance 000, best cost 435.958 + -882.505 = -446.547 over 364 frames.
000 459204 157421 314256 111517 35010 380573 384947 418215 231545 497846 147397 81992 16622 179270 289059 130121 318536 240439
000 하지만 미즈키 유카 두른 계열의 찍혀 처우 탐욕 수록곡 훈육관 몬 네 가 보던 예능 리즈 의 스탯
LOG (lattice-best-path[5.5.971~1-07043]:main():lattice-best-path.cc:124) Overall cost per frame is -1.22678 = 1.19769 [graph] + -2.42446 [acoustic] over 364 frames.
LOG (lattice-best-path[5.5.971~1-07043]:main():lattice-best-path.cc:128) Done 1 lattices, failed for 0

이렇게 나오면 다 된걸까요...? 근데 정확도가 많이 떨어지네요 ㅠㅠ

2021년 9월 30일 목요일 오후 3시 7분 42초 UTC+9에 이승현님이 작성:

익명

unread,
Sep 30, 2021, 2:36:45 AM9/30/21
to zeroth-help
혹시 저희가 더 학습시킬 방법이 있을까요?

2021년 9월 30일 목요일 오후 3시 17분 38초 UTC+9에 익명님이 작성:

이승현

unread,
Sep 30, 2021, 3:09:41 AM9/30/21
to zeroth-help
아예 말도 안되게 결과가 나온 걸 보니 이전에 언급했었던
1. utils/lang/check_phones_compatible.sh: phone symbol tables data/lang_test_tgsmall/phones.txt and data/lang_chain/phones.txt are not compatible.
이 부분의 문제때문인 것 같네요.

원래 정상적으로 진행이 잘 된다면 이 부분에서 문제가 생길일은 없긴 합니다...
아무튼 음성 신호 인식까지는 잘 되는데 이 신호들을 음소로, 그리고 단어로 표현하는 데 이상한 단어들로 매칭을 시켜버린 것입니다.
가장 좋은 방법은 처음부터 다시 학습하는 것이지만 이는 시간이 오래 걸릴 수도 있으니 그래프를 다시 구축하는 방법을 시도해봐야할 것 같네요.

run_tdnn_1n.sh의 stage 13을 참고하시면 됩니다. 아니면 이 부분부터 시작하셔도 되고요.
$tree_dir(아마 exp/chain_rvb/tree_a로 되어 있을 겁니다.)의 phones.txt 파일을 data/lang_test_tgsmall의 phones.txt로 교체하셔야 합니다.
그 다음 mkgraph.sh로 그래프를 생성하고(이는 그렇게 오래 걸리지 않을 겁니다) 다시 export 한 후 decoding을 해보십쇼.

저도 비슷한 오류를 본 적이 있었는데, 조금 오래된 일이어서 이 방법이 효과가 있었는지는 기억이 잘 나지 않습니다.
이 방법이 정상적인 방법은 아니기도 하고...
만약 이 방법도 통하지 않는다면 처음부터 다시 시작하는 것도 좋습니다...
2021년 9월 30일 목요일 오후 3시 36분 45초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Sep 30, 2021, 4:06:16 AM9/30/21
to zeroth-help
혹시 저희가 따로 학습용 데이터셋을 이용해서 추가로 학습시킬 방법은 없을까요?

2021년 9월 30일 목요일 오후 4시 9분 41초 UTC+9에 이승현님이 작성:

익명

unread,
Sep 30, 2021, 7:52:33 PM9/30/21
to zeroth-help
#### Decoding ####
/opt/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=/opt/zeroth/s5/models/opt/zeroth/s5/models/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=/opt/zeroth/s5/models/opt/zeroth/s5/models/words.txt /opt/zeroth/s5/models/opt/zeroth/s5/models/final.mdl /opt/zeroth/s5/models/opt/zeroth/s5/models/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 >/opt/zeroth/s5/test/lat.1.gz'
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:ComputeDerivedVars():ivector-extractor.cc:204) Done.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:RemoveOrphanNodes():nnet-nnet.cc:948) Removed 1 orphan nodes.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:RemoveOrphanComponents():nnet-nnet.cc:847) Removing 2 orphan components.
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:Collapse():nnet-utils.cc:1488) Added 1 components, removed 2
LOG (online2-wav-nnet3-latgen-faster[5.5.971~1-07043]:CompileLooped():nnet-compile-looped.cc:345) Spent 0.0149009 seconds in looped compilation.
wav-copy scp,p:wav.scp ark:-
LOG (wav-copy[5.5.971~1-07043]:main():wav-copy.cc:68) Copied 1 wave files
lattice-scale --acoustic-scale=10.0 ark:- ark:-
LOG (lattice-scale[5.5.971~1-07043]:main():lattice-scale.cc:107) Done 0 lattices.
./local/decode.sh: line 73: 29397 Segmentation fault      (core dumped) $decoder $silence_weighting_opts --do-endpointing=$do_endpointing --frames-per-chunk=$frames_per_chunk --extra-left-context-initial=$extra_left_context_initial --online=$online $frame_subsampling_opt --config=$online_config --verbose=2 --min-active=$min_active --max-active=$max_active --beam=$beam --lattice-beam=$lattice_beam --acoustic-scale=$acwt --word-symbol-table=$srcdir/words.txt $srcdir/final.mdl $srcdir/HCLG.fst $spk2utt_rspecifier "$wav_rspecifier" "$lat_wspecifier"
##### LM rescore ####
lattice-1best ark:- 'ark:|gzip -c > /opt/zeroth/s5/test/lmre_lat.1.gz'
lattice-add-penalty --word-ins-penalty=0.0 ark:- ark:-
lattice-scale --inv-acoustic-scale=11.0 ark:- ark:-
lattice-lmrescore-const-arpa --lm-scale=1.0 ark:- /opt/zeroth/s5/models/opt/zeroth/s5/models/G.carpa ark:-
lattice-lmrescore --lm-scale=-1.0 'ark:gunzip -c /opt/zeroth/s5/test/lat.1.gz|' 'fstproject --project_output=true /opt/zeroth/s5/models/opt/zeroth/s5/models/G.fst |' ark:-
LOG (lattice-lmrescore[5.5.971~1-07043]:main():lattice-lmrescore.cc:148) Done 0 lattices, failed for 0
LOG (lattice-lmrescore-const-arpa[5.5.971~1-07043]:main():lattice-lmrescore-const-arpa.cc:117) Done 0 lattices, failed for 0
LOG (lattice-scale[5.5.971~1-07043]:main():lattice-scale.cc:107) Done 0 lattices.
LOG (lattice-add-penalty[5.5.971~1-07043]:main():lattice-add-penalty.cc:62) Done adding word insertion penalty to 0 lattices.
LOG (lattice-1best[5.5.971~1-07043]:main():lattice-1best.cc:103) Done converting 0 to best path, 0 had errors.
lattice-copy 'ark:gunzip -c /opt/zeroth/s5/test/lmre_lat.1.gz|' ark:-
lattice-best-path --word-symbol-table=/opt/zeroth/s5/models/opt/zeroth/s5/models/words.txt ark:- ark,t:-
LOG (lattice-copy[5.5.971~1-07043]:main():lattice-copy.cc:225) Done copying 0 lattices.
LOG (lattice-best-path[5.5.971~1-07043]: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.971~1-07043]:main():lattice-best-path.cc:128) Done 0 lattices, failed for 0

run_openslr.sh로 스테이지 13부터 재실행 한 후 디코딩하면 결과가 이렇게 나옵니다 뭐가 문제인걸까요 

2021년 9월 30일 목요일 오후 5시 6분 16초 UTC+9에 익명님이 작성:

익명

unread,
Sep 30, 2021, 7:54:48 PM9/30/21
to zeroth-help
run_tdnn_1n.sh로 실행을 하면 

+ exit 1
+ touch exp/chain_rvb/tdnn1n_rvb/.error
+ '[' -f exp/chain_rvb/tdnn1n_rvb/.error ']'
+ echo './run_tdnn_1n.sh: there was a problem while decoding'
./run_tdnn_1n.sh: there was a problem while decoding
+ exit 1

이렇게 오류가 발생합니다 !
2021년 10월 1일 금요일 오전 8시 52분 33초 UTC+9에 익명님이 작성:

이승현

unread,
Oct 1, 2021, 5:26:57 AM10/1/21
to zeroth-help
따로 학습용 데이터셋을 이용해서 추가로 학습하는 방법은
run_openslr.sh같은 스크립트를 실행했을 때 다운로드되는 speechDATA의 데이터셋처럼 형식을 맞춰서 추가 데이터셋을 준비하시면 됩니다.

그리고 위의 에러는 원인을 잘 모르겠습니다.
그래프는 잘 생성이 되었나요?
아래의 오류는 run_tdnn_1n.sh에서 마지막 디코딩하는 부분에서 뜨는 거라 이게 원인은 아닐 겁니다.
위의 오류와 비슷하게 뭔가 위에서부터 잘못되어서 디코딩할 때 문제가 생겼다는 것 같습니다.
2021년 10월 1일 금요일 오전 8시 54분 48초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Oct 7, 2021, 8:28:40 PM10/7/21
to zeroth-help
혹시 그래프 생성할 때 파라미터 값하고 제대로 생성이 되면 뭐가 바뀌는지 알 수 있을까요...?

2021년 10월 1일 금요일 오후 6시 26분 57초 UTC+9에 이승현님이 작성:

익명

unread,
Oct 8, 2021, 12:10:34 AM10/8/21
to zeroth-help
그리고 혹시 run_openslr.sh 상단에 set 하고 옵션값이 있는데 -x와 -o -e는 뭔차이인가요?

2021년 10월 8일 금요일 오전 9시 28분 40초 UTC+9에 익명님이 작성:

이승현

unread,
Oct 12, 2021, 1:42:20 AM10/12/21
to zeroth-help
그래프 생성 시의 파라미터 값은 그냥 기본 레시피의 값을 그대로 사용하셔도 괜찮습니다.
그래프가 제대로 생성되었는지 여쭤본 건 디코딩이 제대로 안되었으니 어디가 문제인지 찾기 위해 하나씩 확인하기 위해서입니다.
제대로 생성이 되면 뭐가 바뀐다기보다는 디코딩이 정상적으로 진행이 됩니다. 
적어도 정확도가 떨어진 결과라도 나옵니다.

set에서 -x는 어떤 명령어를 수행하는지 그 명령어를 쉘에 출력 후 실행하는 옵션입니다.
현재 어떤 명령을 수행중인지, 또는 에러가 발생해 프로세스가 죽었을 때 어떤 명령을 수행하다 죽었는지 알기 위해서 사용합니다.

-o는 아마 run_tdnn_1n.sh에서 set -e -o pipefail 이라는 라인에서 확인하셨을 겁니다.
-o는 뒤에 오는 pipefail이라는 설정을 ON으로 바꾼다는 뜻입니다. 반대로 +o라고 하면 OFF로 바꾸게 됩니다.
pipefail을 ON으로 설정하면 파이프로 연결된 명령들의 종료 상태가 하나라도 false면 false를 반환합니다.
pipefail 외에 설정들은 set -o만 치시면 확인할 수 있습니다.

-e는 명령어 실행 중 오류가 발생하면 종료시키는 옵션입니다.
정확히는 종료 상태가 0이 아니면 프로그램을 종료합니다.

2021년 10월 8일 금요일 오후 1시 10분 34초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Oct 12, 2021, 3:44:01 AM10/12/21
to zeroth-help
여태 답변 너무 감사드립니다 ㅠㅠ 아직까지도 결과가 제대로 나오지 않고 있어 기존에 set -x 옵션으로 되어있었는데 set -o 옵션을 주고 실행해보니 

cat: data/lang_chain/phones/silence.csl: No such file or directory
이 오류를 뿜고 죽었습니다...

2021년 10월 12일 화요일 오후 2시 42분 20초 UTC+9에 이승현님이 작성:

이승현

unread,
Oct 12, 2021, 4:18:39 AM10/12/21
to zeroth-help
아마 run_tdnn_1n.sh에서 스테이지 8부분인 것 같습니다.
data/lang을 data/lang_chain으로 복사한 후 data/lang_chain/phones/silence.csl을 cat하는 부분이 바로 아래에 있습니다.
근데 이 부분에서 오류가 났다는 것은 복사(cp)가 제대로 안되었거나 애초에 data/lang에 해당 파일이 없었다는 것입니다.
cp 명령어가 안될리는 없을 것 같고(안되었으면 여기서 에러가 났을 것 같습니다) 후자인 것 같네요.

아무튼 이 파일은 run_openslr.sh에서 아래 부분에서 생성합니다.

144 utils/prepare_lang.sh data/local/dict \
145       "<UNK>" data/local/lang_tmp data/lang

정상적으로 되었다면 당연히 이 부분에서 이상이 있을 리가 없고 이상이 있으면 진행이 될리가 없는데 이상하네요.
이 부분들을 확인해보셔야 할 것 같습니다.

좀 더 정확히 이상이 있는지 확인해보시려면
zeroth 프로젝트 디렉터리를 따로 하나 더 만드시고(즉 초기 상태의 프로젝트를 준비하시고) 비교해가며 실행하는 것도 좋습니다.
2021년 10월 12일 화요일 오후 4시 44분 1초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Oct 12, 2021, 10:34:02 PM10/12/21
to zeroth-help
혹시 계속 안된다면 kaldi가 문제가 있을 수도 있나요? 이쯤되니 kaldi 제대로 설치가 되었는지 모르겠네요...

2021년 10월 12일 화요일 오후 5시 18분 39초 UTC+9에 이승현님이 작성:

이승현

unread,
Oct 13, 2021, 1:02:39 AM10/13/21
to zeroth-help
kaldi 컴파일 과정에서 제대로 진행이 안되었으면 문제가 있을 수 있습니다.
근데 보통 컴파일이 제대로 안되었으면 중간까지 진행이 되기도 전에 오류가 났을 겁니다.

2021년 10월 13일 수요일 오전 11시 34분 2초 UTC+9에 wotn...@gmail.com님이 작성:
Message has been deleted

익명

unread,
Oct 19, 2021, 8:19:13 PM10/19/21
to zeroth-help
드디어 성공 했습니다 ㅠㅠ 여태 도와주셔서 너무 감사드립니다.. 아무리 해봐도 안되서 새로 받아서 처음부터 차근차근 시도해보니 바로 성공했습니다 혹시 제가 직접 녹음한 파일을 이용하여 디코딩을 해보고싶은데 어떻게 하면 될까요...? 녹음해서 파일을 옮겨보니 wav파일이라 안되네요 ㅠㅠ

2021년 10월 13일 수요일 오후 2시 2분 39초 UTC+9에 이승현님이 작성:

익명

unread,
Oct 20, 2021, 2:27:30 AM10/20/21
to zeroth-help
그리고 실시간으로 디코딩처리를 하고싶은데 어떻게 하면 될까요..?

2021년 10월 20일 수요일 오전 9시 19분 13초 UTC+9에 익명님이 작성:

이승현

unread,
Oct 21, 2021, 2:27:40 AM10/21/21
to zeroth-help
wav 파일같은 경우에 ffmpeg 등을 이용해 flac으로 변환해서 디코딩하시면 됩니다.

ex) 
sudo apt-get install ffmpeg
ffmpeg -i <wav 파일> -ar <sample rate> -ac <sample channel> <결과 flac 파일>
ffmpeg -i test.wav -ar 16000 -ac 1 test.flac

저는 이런 식으로 변환해 사용하곤 합니다.
보통 sample rate는 16000, channel은 mono라 1로 설정했습니다.

실시간 디코딩 처리는 kaldi-gstreamer-server를 참고하시면 도움이 될 것 같습니다.



2021년 10월 20일 수요일 오후 3시 27분 30초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Oct 26, 2021, 10:30:49 PM10/26/21
to zeroth-help
실시간 디코딩 처리를 해보니 역시 마이크를 통해 입력이 되서 그런지 인식률이 많이 낮네요 ㅜㅜ 혹시 kspon 데이터로 학습시켜보신 적 있으신가요?
2021년 10월 21일 목요일 오후 3시 27분 40초 UTC+9에 이승현님이 작성:

SH Lee

unread,
Oct 28, 2021, 2:54:29 AM10/28/21
to zeroth-help
저는 kspon 데이터로 학습해본적 없습니다


2021년 10월 27일 수요일 오전 11시 30분 49초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Oct 28, 2021, 8:14:07 PM10/28/21
to zeroth-help
여러 글 찾아보면서 해봐야겠네요 ㅠㅠ 여태까지 도와주셔서 정말 감사합니다 덕분에 포기하지 않고 성공할 수 있었던 것 같습니다 정말 감사합니다 !

2021년 10월 28일 목요일 오후 3시 54분 29초 UTC+9에 SH Lee님이 작성:

익명

unread,
Oct 28, 2021, 8:16:41 PM10/28/21
to zeroth-help
혹시 그러면 추가 학습은 따로 안하시고 기존 훈련 데이터셋으로만 사용하고 계신건가요?

2021년 10월 28일 목요일 오후 3시 54분 29초 UTC+9에 SH Lee님이 작성:
저는 kspon 데이터로 학습해본적 없습니다

SH Lee

unread,
Oct 31, 2021, 8:43:08 PM10/31/21
to zeroth-help
kspon데이터 말고 따로 데이터 구축해서 추가 학습한 적은 있습니다.

이 때 파일 형식이나 데이터 디렉터리 구조(speechData/ 아래의 디렉터리 구조)는 기존 zeroth 레시피에 맞추어 준비했습니다.

2021년 10월 29일 금요일 오전 9시 16분 41초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Nov 2, 2021, 2:58:20 AM11/2/21
to zeroth-help
혹시 따로 데이터 구축하려면 어떻게 맞춰야 하나요 zeroth 레시피가 이해가 안되네요 ㅠㅠ

2021년 11월 1일 월요일 오전 9시 43분 8초 UTC+9에 SH Lee님이 작성:

SH Lee

unread,
Nov 2, 2021, 3:35:40 AM11/2/21
to zeroth-help
run_openslr.sh을 실행했을 때 다운로드받는 speechDATA 아래의 구성으로 맞추시면 됩니다.
speechDATA에서 train_data_01나 test_data_01아래에 003 디렉터리가 있다고 가정하겠습니다.

아래는 003 디렉터리 구성입니다. 아마 몇 번 보셨을 것입니다.

./003
├── 104
│   ├── 104_003.trans.txt
│   ├── 104_003_0019.flac
│   ├── 104_003_0193.flac
.
.
.
│   ├── 104_003_2982.flac
│   └── 104_003_2993.flac
├── 105
│   ├── 105_003.trans.txt
│   ├── 105_003_0029.flac
.
.
.
│   ├── 105_003_1370.flac
.
.
.

003 아래에 104, 105 등의 디렉터리들이 있고 각 디렉터리 안에 .trans.txt로 끝나는 transcript 파일과 오디오 데이터인 .flac 파일들이 있습니다.

transcript 파일에는 아래와 같이 텍스트 데이터가 저장되어있습니다.

104_003_0019 지난해 삼 월 김 전 장관의 동료인 장동련 홍익대 교수가 민간 자문단장으로 위촉되면서 본격적인 공모와 개발 작업에 들어갔다
104_003_0193 그 바람에 나의 몸도 겹쳐 쓰러지며 한창 피어난 노란 동백꽃 속으로 폭 파묻혀 버렸다
104_003_0253 현재 백화점과 영화관 등은 오픈해 영업하고 있고 테마파크 및 아파트 등의 공사는 이천 십 팔 년 완공을 목표로 진행돼 왔다
104_003_0280 또한 박 전 대통령 측은 앞으로 검찰 수사와 관련해 수사 내용에 대한 입장뿐 아니라 변호인단의 활동 상황 등도 소상하게 공개한다는 방침이다

각 라인은 각 flac 파일들에 대응됩니다. 

파일 이름(utterance ID) 규칙을 지키는 게 중요합니다.

A_B_C.flac 형태로 되어있습니다. 학습 진행에 있어서 크게 중요하진 않으나 간단히 설명하자면,

A_B는 speaker ID, C는 utterance ID입니다. 자세한 건 아래 링크를 참고하시면 됩니다.


이 ID는 겹치지만 않는다면 자유롭게 정하셔도 좋습니다. speaker ID이지만 꼭 speaker가 구분될 필요도 없습니다.
보통 speaker ID는 데이터셋을 알아보기 쉽게 정하는 편이고 utterance ID는 그냥 0001부터 오름차순으로 정합니다.

flac 파일 이름을 결정하시면 디렉터리 구조도 그에 맞게 바꾸셔야 합니다.
즉 B/A/A_B_C.flac 형태를 맞추셔야 합니다.

위의 예시를 들자면 003/104/104_003_0019.flac 같이 맞추시면 됩니다.

transcript 파일의 실제 텍스트 앞에도 이 ID를 붙여주시면 됩니다.

104_003_0019 지난해 삼 월 김 전 장관의 동료인 장동련 홍익대 교수가 민간 자문단장으로 위촉되면서 본격적인 공모와 개발 작업에 들어갔다

이런 식으로 디렉터리 구조가 맞춰지면 마지막으로 AUDIO_INFO 파일을 생성하셔야 합니다.
AUDIO_INFO 파일은 말 그대로 AUDIO에 대한 정보를 담고 있는 파일인데

모든 utterance가 아닌 speaker에 대한 정보를 담고 있습니다.

speechDATA/AUDIO_INFO 파일을 참고하시면 바로 알 수 있을 정도로 간단합니다.

B|<발화자 이름>|<발화자 성별>|A|<데이터 종류>

"|"로 구분합니다.
첫 번째는 위의 예시에서 B, 003 이런 값입니다.
두 번째, 세 번째는 발화자의 이름과 성별인데 크게 중요하진 않습니다. 이름은 아무렇게나 정하셔도 되고 성별은 m(male),f(female) 둘 중 하나로 입력하시면 됩니다.
네 번째는 위의 예시에서 A, 104와 같은 값들을 넣으시면 됩니다.
마지막은 데이터 종류를 의미합니다. 크게 중요하지 않습니다. 그냥 train_data_01인지 test_data_01인지 적으시면 됩니다. 꼭 안 맞아도 돌아가더라구요.

대충 이런 식으로 구성하시면 됩니다.
2021년 11월 2일 화요일 오후 3시 58분 20초 UTC+9에 wotn...@gmail.com님이 작성:

익명

unread,
Nov 2, 2021, 7:56:05 PM11/2/21
to zeroth-help
정말 감사합니다 이렇게 자세하게 설명해주셔서... 현재 kspon으로 학습 진행중이어서 이거 완료되면 직접 만들어서 해봐야겠네요 감사합니다 !!

2021년 11월 2일 화요일 오후 4시 35분 40초 UTC+9에 SH Lee님이 작성:
Reply all
Reply to author
Forward
0 new messages