14
專專專專 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun- Chiao Li 1

專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Embed Size (px)

Citation preview

Page 1: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

專題研究 (4)HDecode_live

Prof. Lin-Shan Lee, TA. Yun-Chiao Li

1

Page 2: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Additional Information about Kaldi

Part 12

Page 3: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Kaldi – some practices (1/2)

In 03.01: Try to modify the total number of Gaussian

by modifying “totgauss” In 04.01:

Try to modify the number of leaves of decision tree by modifying “numleaves”

Try to modify the total number of Gaussian by modifying “totgauss”

run through the scripts and see the changes in performance and the optimal weight

3

Page 4: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Kaldi – some practices (2/2)

Some tips: you can change “numleaves” up to around

4500 keeping the number of Gaussian less than 20

times of “numleaves” is more stable Try to modify other parameters if you

have time: numiters: number of iterations realign_iters: those iterations to realign the

feature to state

4

Page 5: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Simple Live Recognition System (HDecode_live)

Part 25

Page 6: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Simple Recognition System

Make sure the microphone is functional 和 HDecode 用法相同 (hdecode.sh)

HDecode -> Hdecode_live Make sure HDecode, record, HCopy is

under the same directory Work on cygwin Use bi-gram language model -a 0.5 (acoustic model weight) -s 8.0 (language model weight) -t 75.0 (beamwidth)

6

You can change these parameters and see what will

happen

Page 7: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Setup

Cygwin The purpose to use Cygwin is to simulate

the unix operating system in windows Install Cygwin

http://cygwin.com/setup-x86.exe (x86 only!!)

Download /share/HDecode_live/ to C:\cygwin\home\youraccount\

HDecode_live leave all the options default and click next

7

Page 8: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

• There are two sets of recognition system• Lecture

• AM here is trained by Prof. Lee’s sound

• News• AM here is trained

by several news reporter’s sound

• The News system provides better performance

Page 9: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Acoustic Model

Training AM by HTK is time consuming We’ve trained it for you

final.mmf is the speaker dependent AM trained by Prof. Lee’s voice

Therefore, it is suitable to recognize the professor’s voice

it is the same as what we used in Kaldi

9

Page 10: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Acoustic Model Example10

Here is the HMM model for each

phone

Here is the Gaussian mixture model for

each state

Page 11: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Language model training (1/2) remove the first column in

material/train.text, and rename it as train.lecture hint: vim visual block + “d”

train.lecture: OKAY [A66E] [A655][A6EC] [A6AD] [B36F][AAF9][BDD2] [AC4F] [BCC6][A6EC] [BB79][ADB5][B342][B27A]

EMPH_A [A8BA] [B36F][AC4F] [A8E2] [ADD3] [A5D8][AABA]

Change encoding: /share/tool/chencoding -f ascii -t utf8 train.lecture >

train.lecture.utf8 OKAY 好 各位 早 這門課 是 數位 語音處理 EMPH_A 那 這是 兩 個 目的

11

Page 12: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Language model training (2/2) We prepare another language model too

Use the news corpus to train language model copy it to your folder

cp /share/corpus/train.* . cp /share/corpus/lexicon.* .

/share/tool/ngram-count -order 2 (you can modify it from 1~3!) -kndiscount (modified Kneser-Ney) -text train.lecture (training data, also try

train.news!) -vocab lexicon.lecture (lexicon, also try

lexicon.news!) -lm languagemodel (output language model

name)

12

Page 13: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Simple Recognition System

Execute Cygwin Terminal in Windows Edit hdecode.lecture.sh/hdecode.news.sh

change the language model to your’s Execute “bash

hdecode.lecture.sh/hdecode.news.sh” Wait until “Ready…” appears in the terminal Click “Enter” and say something Click “Enter” again and wait for the result Type “exit” if you want to leave

13

Page 14: 專題研究 (4) HDecode_live Prof. Lin-Shan Lee, TA. Yun-Chiao Li 1

Some hint

If you have any problem training LM: scripts are here: /share/scripts/

14