Thursday, January 29, 2009

HTK Chapter 3 - Section 1 - Step 4

Below paragraphs are belong to
  • HTKBooks, 
  • 苏统华, 哈尔滨工业大学人工智能研究室, 2006年10月30日, 
  • Howard Hung-Ju Chou, Intelligence Information Retrieval Lab., NCKU, Taiwan(R.O.C.).
Environment:
  • HTK 3.4 
  • Cygwin NT-5.1 1.5.25
Section 1 is Data Preparation - 資料準備
Because we have two words set
trainprompts
testprompts
First of all, we have to convert the two prompts files to be words files. That means
====================
S0002 DIAL ZERO ZERO EIGHT SIX OH ONE ZERO NINE THREE FIVE EIGHT FIVE THREE THREE NINE ZERO
====================
will be convert to
====================
"S0002.lab"
DIAL
ZERO
ZERO
EIGHT
SIX
OH
ONE
ZERO
NINE
THREE
FIVE
EIGHT
FIVE
THREE
THREE
NINE
ZERO
.
====================
Prompts level converts to word leavel.
How to read MLF(Master Label File), you can refer
Section 6.3 in HTKbook.

Command is below,
------------------------------------------------------------------------------
$ perl  scripts/prompts2mlf labels/trainwords.mlf labels/trainprompts
------------------------------------------------------------------------------
For testwords.mlf,
------------------------------------------------------------------------------
$ perl  scripts/prompts2mlf labels/testwords.mlf labels/testprompts
------------------------------------------------------------------------------

Then use HLEd (Label Editor) to convert word level to phone level.
--------------------------------------------------
$ HLEd -l   '*'  -d dict/dict1 -i  labels/phones0.mlf   mkphones0.led   labels/trainwords.mlf
--------------------------------------------------

mkphones0.led is edit script filr to tell HLEd how to generate labels/phones0.mlf from labels/trainwords.mlf.
==============
EX
IS sil sil
DE sp
==============
  • EX, means replace all the words in labels/trainwords.mlf to phones level.
  • IS sil sil, means insert sil to the start and the end of utterance.
  • DE sp, means that deleting all short-pause.
HLEd will refer the dict/dict1 to transcript each word to its phones.
To know more about HLEd, refer to Section 17.10 in HTKBook.

Then labels/trainwords.mlf will be replaced to labels/phones0.mlf
Like, 
===============
"*/S0001.lab"
DIAL
EIGHT
FIVE
.
===============
replaced to
===============
"*/S0001.lab"
sil
d
ay
ax
l
ey
t
f
ay
v
sil
.
===============
sil is inserted to the start and the end. DIAL is replaced to d and ay.

No comments:

Clicky

Clicky Web Analytics