Kaldi 離線線上解碼應用

std1984發表於2014-09-16
環境:Ubuntu 12.04,   Kaldi


timit訓練完語音模型後可以進入解碼,

1. 首先安裝PortAudio
cd /u01/kaldi/tools/portaudio
./configure
make
sudo make install

2. 編譯安裝onlinebin
cd /u01/kaldi/src/onlinebin
make

離線解碼:

3. 切換到訓練好的模型目錄/u01/kaldi/egs/timit/s5/exp/tri1,執行命令如下:
/u01/kaldi/src/onlinebin/online-wav-gmm-decode-faster --rt-min=0.3 --rt-max=0.5 --max-active=4000 --beam=12.0 --acoustic-scale=0.0769 scp:../../data/train/split10/1/wav.scp final.mdl graph/HCLG.fst graph/words.txt '1:2:3:4:5' ark,t:trans.txt ark,t:ali.txt

結果輸出如下:

File: faem0_si1392
sil ax s uw m f ao r ix vcl z ae m cl p el ax s ix cl ch uw ey sh en w er f aa r m hh eh z ax cl p ae cl k ix ng sh eh vcl d ae n vcl d f iy l vcl s sil


File: faem0_si2022
sil


sil


sil w ah dx ow cl t ih cl t ih sh iy vcl d r ay f ao r sil


File: faem0_si762
sil f ih l s epi m ao l hh ow l ix n vcl b ow l w ix cl k l ey sil

...................

sil m ey ay vcl d ow ix n vcl g eh cl k ix s ae n vcl jh ix m aa m ah sil


File: fhxs0_sx175
sil s ix v iy ah m ay eh l cl p iy ah cl k ix n cl t ey vcl b iy dx ih cl t uw r aa n z epi f iy r iy aa r dx iy cl k aa m c


File: fhxs0_sx265
sil dh ix s ao r ih z vcl b r ow cl k ix n s ah cl ch aa cl p dh ax w uh vcl en s cl t eh vcl sil


File: fhxs0_sx355
sil


sil aa l f ih n z aa r ix n cl t eh l ix vcl jh ix n er r iy n m ae m ax l s sil


File: fhxs0_sx445
sil w ah dx ih z ih z l ao vcl jh ix ng vcl b ay dx iy ay n iy ng vcl b el ix cl sil


File: fhxs0_sx85
sil s ix m eh n cl t ix z epi m eh zh uw dx ix n cl k y uw vcl b ih cl k y aa r vcl d z sil


4. 線上解碼 (需要microphone)

jerry@hq:/u01/kaldi/egs/timit/s5/exp/tri1$ /u01/kaldi/src/onlinebin/online-gmm-decode-faster --rt-min=0.3 --rt-max=0.5 --max-active=4000 --beam=12.0 --acoustic-scale=0.0769 final.mdl graph/HCLG.fst graph/words.txt '1:2:3:4:5'


另外一個線上解碼應用
cd /u01/kaldi/egs/voxforge/online_demo
./run.sh --test-mode live

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/16582684/viewspace-1270816/,如需轉載,請註明出處,否則將追究法律責任。

相關文章