1 專題研究 WEEK1 Prof. Lin-shan Lee TA. Cheng-Chieh Yeh
2 Otline 1. Project Introdction and Schedle 2. Linx Basic 3. Featre Extraction 4. Homework
3 Project Introdction and Schedle
第一階段專題 4 目的 : 提供一些程式腳本以及訓練語料, 透過建立一個基本的大字彙語音辨識系統, 讓同學對語音辨識有具體的了解, 並且以此作為進一步研究各項進階技術的基礎 Inpt Speech Speech Recognition System Otpt Sentence 今天
語音辨識系統 5 Inpt Speech Front-end Signal Processing Featre Vectors Lingistic Decoding and Search Algorithm Otpt Sentence Speech Corpora Acostic Model Training Acostic Models Lexicon Langage Model Langage Model Constrction Text Corpora Lexical Knowledge-base Grammar Difficlt and costly to implement? Kaldi toolkit comes in handy.
Schedle 6 Week Progress Grop 1 Introdction + Linx Basic+ Featre extraction 2 Acostic model training:monophone & triphone 3 Langage model training + Decoding A 4 Live demo B 5 Deep Neral Networks in Kaldi A 6 第二階段分組 + Progress Report B 7 Progress Report A
How to do recognition? 7 How to map speech O to a word seqence W? P(O W): Acostic model P(W): Langage model
Langage model P(W) 8 W = w 1, w 2, w 3,, w n
Langage model examples 9 log prob Probability in log scale
Acostic Model P(O W) 10 Model of a phone Markov Model Gassian Mixtre Model
11 Lexicon
12 Linx Basic
Vim 13 如何建立文件 : vim hello.txt 進去後, 輸入 i 即可進入編輯模式 n 此時, 輸入任何你想要打的 此時, 按下 ESC 即可回復一般模式, 此時可以 : n 輸入 / 你要搜尋的文字 n 輸入 :w 即可存檔 n 輸入 :wq 即可存檔 + 離開
Screen 14 簡單講一下, 避免因為斷線而程式跑到一半就失敗了, 大家可以使用 screen, 簡單使用法如下 : 1) 一登入後打 "screen", 就進入了 screen 使用模式, 用法都相同 2) 如果想要關掉此 screen 也是用 "exit" 3) 如果還有程式在跑沒有想關掉他, 但是想要跳出, 按 "Ctrl + a" + "d" 離開 screen 模式 ( 此時登出並關機程式也不會斷掉 ) 4) 下次登入時, 打 "screen -r" 就可以跳回之前沒關掉的 screen 唷 ~ 5) 打 screen -r 也許會有很多個未關的 screen, 輸入你要的 screen id 即可 ( 越大的越新 ) 這樣就算關掉電腦, 工作仍可以進行!!!
Linx Shell Script Basics 15 echo Hello (print hello on the screen) a=abc (assign ABC to a) echo $a (will print ABC on the screen) b=$a.log (assign ABC.log to b) cat $b > testfile (write ABC.log to testfile) 任何指令 -h (will otpt the help information)
Bash #!/bin/bash cont=99 if [ $cont -eq 100 ] then echo "Cont is 100" elif [ $cont -gt 100 ] then echo "Cont is greater than 100" else echo "Cont is less than 100" fi
Bash script [ condition ] ses test to check. Ex. test -e ~/tmp; echo $? File [ -e filename ] -e 該 檔名 是否存在? -f 該 檔名 是否存在且為檔案 (file)? -d 該 檔名 是否存在且為目錄 (directory)? Nmber [ n1 -eq n2 ] -eq 兩數值相等 (eqal) -ne 兩數值不等 (not eqal) -gt n1 大於 n2 (greater than) -lt n1 小於 n2 (less than) -ge n1 大於等於 n2 (greater than or eqal) -le n1 小於等於 n2 (less than or eqal) 空白不能少!!!!!!!
Bash script Logic -a (and) 兩狀況同時成立! -o (or) 兩狀況任何一個成立!! 反相狀態 [ "$yn" == "Y" -o "$yn" == "y" ] [ "$yn" == "Y" ] [ "$yn" == "y" ] 雙引號不可少!!!!!
Bash script i=0 while [ $i -lt 10 ] do echo $i i=$(($i+1)) done for (( i=1; i<=10; i=i+1 )) do echo $i done 空白不可少!!!!
Bash script Pipeline cat filename head ls -l grep key less program1 program2 program3 echo hello tee log
Bash script ` operation echo `ls` my_date=`date` echo $my_date && ; operation echo hello echo no~ echo hello && echo no~ [ -f tmp ] && cat tmp echo "file not fond [ -f tmp ] ; cat tmp ; echo "file not fond Some sefl commands. grep, sed, awk, toch, ln
22 Featre Extraction 02.extract.feat.sh Inpt Speech Front-end Signal Processing Featre Vectors Lingistic Decoding and Search Algorithm Otpt Sentence Speech Corpora Acostic Model Training Acostic Models Lexicon Langage Model Langage Model Constrction Text Corpora Lexical Knowledge-base Grammar
23 Featre Extraction - MFCC
MFCC (Mel-freqency cepstral coefficients) 24 13 dimensions vector
Extract Featre (02.extract.feat.sh) 25 Training Set Inpt Otpt Archive 目錄 Development Set Testing Set
Kaldi rspecifier & wspecifier format 26 ark:<ark file> 眾多小檔案的檔案庫, 可能是 wav 檔 mfcc 檔 statistics 的集合 scp:<scp file> 一群檔案的位置表, 可能指向個別檔案 ( 如我們的 material/train.wav.scp), 也可以指向 ark 檔中的位置 ark,t:<ark file> 輸出文字檔案的 ark, 當輸入時,t 無作用 ; 不加,t, 預設輸出二進位格式 ark,scp:<ark file>,<scp file> 同時輸出 ark 檔和 scp 檔
Extract Featre (extract.feat.sh) 27 add-deltas compte-cmvn-stats apply-cmvn
MFCC Add delta 28 add-deltas Deltas and Delta-Deltas 將 MFCC 的 Δ 以及 ΔΔ ( 意近一次微分與二次微分 ) 加入參數中, 使得總維度變成 39 維 Usage:
MFCC CMVN 29 CMVN: Cepstral Mean and Variance Normalization
MFCC CMVN 30 compte-cmvn-stats Usage: apply-cmvn Usage:
31 Hint (Important!!)
32 Homework Linx, backgrond knowledge 01.format.sh, 02.extract.feat.sh
Homework 33 ß 如果你沒有操作 Linx 系統的經驗, 請事先預習 Linx 系統的指令 鳥哥的 Linx 私房菜 ß 第七章 Linx 檔案與目錄管理 ßhttp://linx.vbird.org/linx_basic/0220filemanager.php Þ 第十章 vim 程式編輯器 Þhttp://linx.vbird.org/linx_basic/0310vi.php
Homework (optional) 34 閱讀 ( 強烈建議, 後二週會大量看到 ): 使用加權有限狀態轉換器的基於混合詞與次詞以文字及語音指令偵測口語詞彙 第三章 https://www.dropbox.com/s/dsaqh6xa9dp3dzw/wfst_thesis.pdf
Data 35 登入工作站 (pietty/ptty/xshell 等 terminal) ssh 140.112.21.80 port 22 複製壓縮檔到自己的子資料夾 ncp /share/proj1.astmic.sbset.tar.gz 解壓縮 ntar zxvf proj1.astmic.sbset.tar.gz
To Do 36 Step 1: Execte the following command: script/01.format.sh tee log/01.format.log script/02.extract.feat.sh tee log/02.extract.feat.sh.log Step 2: Add-delta CMVN Observe the otpt and report
注意事項 37 If yo have any problem Facebook Grop: 數位語音專題 DSP 課程網頁 :http://speech.ee.nt.ed.tw/corses.html 葉政杰 :r06942067@nt.ed.tw 蔡哲平 :r06922039@nt.ed.tw 周儒杰 :r06922020@nt.ed.tw 留下要開的專題工作站帳號和 e-mail 與 FB 帳號 請各位今晚前寄一封信到 r06942067@nt.ed.tw 說明組員, 組別 (A/B), 要開的專題工作站帳號及你們的 emails, 此外提供 FB 帳號, 才能將你們加入語音專題社團,Thanks