Acoustic Model Discussions

Flat
HCompV ?
User: efstr1126
Date: 8/14/2012 12:37 pm
Views: 8814
Rating: 10

I:\HTK\chineseDigitRecog\chineseDigitRecog\training_1>HCompV -m -o hcompv.hmm -M
 output -I output\digitSylPhone.mlf -S output\trainFea.scp output\template.hmm

i run HCompV  ~  get the error

how to slove

ERROR [+6371]  ValidCodeParms: parm frame rate 0.000000 unlikely ??

please help me!! thank you!!

--- (Edited on 8/14/2012 12:37 pm [GMT-0500] by efstr1126) ---

Re: HCompV ?
User: nsh
Date: 8/14/2012 12:58 pm
Views: 148
Rating: 9

You need to include config file with "-C config" into the command line. The config file should have specific contents. In particular it should have the following line:

TARGETRATE = 100000.0

For more details see the tutorial

http://www.voxforge.org/home/dev/acousticmodels/linux/create/htkjulius/tutorial/monophones/step-6

 

--- (Edited on 8/14/2012 21:58 [GMT+0400] by nsh) ---

Re: HCompV ?
User: efstr1126
Date: 8/15/2012 1:41 am
Views: 135
Rating: 8

but i use

HCompV -m -o hcompv.hmm -M outdir -I trainFiles.mlf -S trainFiles.scp template.hmm

template.hmm  content follow :

~o <VecSize> 13 <MFCC_E> <StreamInfo> 1 13
<BeginHMM>
<NUMSTATES> 5
<STATE> 2<NUMMIXES> 1
<STREAM> 1
<MIXTURE> 1 1.000000e+000
<MEAN> 13
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
<VARIANCE> 13
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
<STATE> 3<NUMMIXES> 1
<STREAM> 1
<MIXTURE> 1 1.000000e+000
<MEAN> 13
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
<VARIANCE> 13
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
<STATE> 4<NUMMIXES> 1
<STREAM> 1
<MIXTURE> 1 1.000000e+000
<MEAN> 13
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
<VARIANCE> 13
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
<TRANSP> 5
0.000000e+000 1.000000e+000 0.000000e+000 0.000000e+000 0.000000e+000
0.000000e+000 6.000000e-001 4.000000e-001 0.000000e+000 0.000000e+000
0.000000e+000 0.000000e+000 6.000000e-001 4.000000e-001 0.000000e+000
0.000000e+000 0.000000e+000 0.000000e+000 6.000000e-001 4.000000e-001
0.000000e+000 0.000000e+000 0.000000e+000 0.000000e+000 0.000000e+000
<ENDHMM>

set method : mfcc13.cfj

#NATURALREADORDER = TRUE
SOURCEKIND = ALIEN              
SOURCEFORMAT = ALIEN
HEADERSIZE=0
SOURCERATE =705
TARGETRATE = 220000.0
WINDOWSIZE = 400000.0
PREEMCOEF = 0.975
NUMCHANS = 26
CEPLIFTER = 22
NUMCEPS = 12
USEHAMMING = T
DELTAWINDOW = 2 
ACCWINDOW= 2

 

please i set the method ,is right? 

--- (Edited on 8/15/2012 1:41 am [GMT-0500] by efstr1126) ---

Re: HCompV ?
User: efstr1126
Date: 8/15/2012 1:52 am
Views: 279
Rating: 9

i want to train ten musicial instruments ,but how to set is it right?

i try on Internet (0~9) of free program ,

i follow it's method step by step !!

@echo off
setlocal
path %path%;%cd%\..\bin.win32;%cd%\..\bin

echo I.1: 產生輸出目錄
for %%i in (output output\feature output\hmm) do mkdir %%i > nul 2>&1

echo I.2: 產生 modelName.txt 及 phone.mlf
@echo EX > output\syl2phone.scp
HLEd -n output\modelName.txt -d digitMonophone.pam -l * -i output\phone.mlf output\syl2phone.scp syl.mlf

echo I.3: 產生 wav2fea.scp
(for /f "delims=" %%i in ('dir/s/b ..\waveFile\*.wav') do @echo %%i output\feature\%%~ni.fea)> output\wav2fea.scp

echo I.4: 使用 HCopy.exe 進行語音特徵抽取
HCopy -C mfcc.cfg -S output\wav2fea.scp

echo II.1: 產生訓練資料和測試資料的檔案列表 trainFea.scp 及 testFea.scp
for %%i in (train test) do (
 for /f %%j in (%%iFile.list) do @echo output\feature\%%j.fea
) > output\%%iFea.scp

echo II.2: 產生 HMM 樣板檔案 template.hmm
rem outMacro.exe P D 3 "1-1-1" MFCC_E 13 > output\template.hmm
outMacro.exe P D 3 1 MFCC_E 13 > output\template.hmm

echo II.3: 使用 Flat Start 產生 hcompv.hmm   
HCompV -m -o hcompv.hmm -M output -I output\phone.mlf -S output\trainFea.scp output\template.hmm

echo II.4: 拷貝 hcompv.hmm 以產生 macro.init
(for /f %%i in (output\modelName.txt) do @sed 's/hcompv.hmm/%%i/g' output\hcompv.hmm) > output\macro.init

echo II.5: 使用 mxup.scp 來修改 macro.init 以產生 macro.0
(@echo MU 3 {*.state[2-4].mix}) > output\mxup.scp
copy /y output\macro.init output\hmm\macro.0
HHEd -H output\hmm\macro.0 output\mxup.scp output\modelName.txt

echo II.6: 進行 EM 以產生 macro.1~macro.5
:loop
  set /a current+=1
 set /a prev=current-1
 copy /y output\hmm\macro.%prev% output\hmm\macro.%current%
 set cmd=HERest -H output\hmm\macro.%current% -I output\phone.mlf -S output\trainFea.scp output\modelName.txt
 echo %cmd%
 %cmd%
if not %current%==5 goto :loop

echo III.1: 使用 digit.grammar 產生 digit.net
Hparse digit.grammar output\digit.net

echo III.2: 對測試資料及訓練資料產生辨識結果
echo  辨識率測試(Outside test):產生 result_test.mlf
HVite -H output\hmm\macro.5 -l * -i output\result_test.mlf -w output\digit.net -S output\testFea.scp digitMonophone.pam output\modelName.txt
echo  辨識率測試(Inside test):產生 result_train.mlf
HVite -H output\hmm\macro.5 -l * -i output\result_train.mlf -w output\digit.net -S output\trainFea.scp digitMonophone.pam output\modelName.txt

echo III.3: 產生 Outside Test 及 Inside Test 的 Confusion Matrix
findstr /v "sil" output\result_test.mlf > output\result_test_no_sil.mlf
findstr /v "sil" syl.mlf > output\answer.mlf
HResults -p -I output\answer.mlf digitMonophone.pam output\result_test_no_sil.mlf > output\outsideTest.txt
echo  Confusion matrix of outside test:
type output\outsideTest.txt

findstr /v "sil" output\result_train.mlf > output\result_train_no_sil.mlf
findstr /v "sil" syl.mlf > output\answer.mlf
HResults -p -I output\answer.mlf digitMonophone.pam output\result_train_no_sil.mlf > output\insideTest.txt
echo  Confusion matrix of inside test:
type output\insideTest.txt

 

the above have the chinese  no care  !!

but  i run

HCompV -m -o hcompv.hmm -M output -I output\phone.mlf -S output\trainFea.scp output\template.hmm

error!!

 

 

--- (Edited on 8/15/2012 1:52 am [GMT-0500] by efstr1126) ---

Re: HCompV ?
User: nsh
Date: 8/15/2012 6:36 am
Views: 135
Rating: 10

> but  i run

>HCompV -m -o hcompv.hmm -M output -I output\phone.mlf -S output\trainFea.scp output\template.hmm

As I wrote above you need to add -C config here, without it it will not work:

HCompV -C config -m -o hcompv.hmm -M output -I output\phone.mlf -S output\trainFea.scp output\template.hmm

 

--- (Edited on 8/15/2012 15:36 [GMT+0400] by nsh) ---

Re: HCompV ?
User: efstr1126
Date: 8/15/2012 9:59 am
Views: 125
Rating: 8

i try your method !!

error ? ~"~

ERROR [+6313]  OpenAsChannel: OpenParmChannel failed
 ERROR [+6316]  OpenBuffer: OpenAsChannel failed
 ERROR [+2050]  LoadFile: Config parameters invalid
FATAL ERROR - Terminating program HCompV

how to set my config

i set

#NATURALREADORDER = TRUE
SOURCEKIND = ALIEN              
SOURCEFORMAT = ALIEN
HEADERSIZE=0
SOURCERATE =705
TARGETRATE = 100000.0
WINDOWSIZE = 200000.0
PREEMCOEF = 0.975
NUMCHANS = 26
CEPLIFTER = 22
NUMCEPS = 12
USEHAMMING = T
DELTAWINDOW = 2 
ACCWINDOW= 2

--- (Edited on 8/15/2012 9:59 am [GMT-0500] by efstr1126) ---

Re: HCompV ?
User: nsh
Date: 8/15/2012 10:23 am
Views: 169
Rating: 9

Just one line

TARGETRATE = 100000.0

is enough. Others are not correct as the tool says you.

 

--- (Edited on 8/15/2012 19:23 [GMT+0400] by nsh) ---

Re: HCompV ?
User: efstr1126
Date: 8/15/2012 10:35 am
Views: 111
Rating: 10

what do you mean?

so it will all error in config ,but i try set in my config ,i don't know set my config ~ it is very confused myself.

 

--- (Edited on 8/15/2012 10:35 am [GMT-0500] by efstr1126) ---

Re: HCompV ?
User: efstr1126
Date: 8/15/2012 10:39 am
Views: 110
Rating: 8

 

ERROR [+6320]  OpenAsChannel: IOConfig tgt not a parameter kind
  ERROR [+6316]  OpenBuffer: OpenAsChannel failed
  ERROR [+2050]  LoadFile: Config parameters invalid
 FATAL ERROR - Terminating program HCompV

--- (Edited on 8/15/2012 10:39 am [GMT-0500] by efstr1126) ---

Re: HCompV ?
User: efstr1126
Date: 8/15/2012 1:15 pm
Views: 4572
Rating: 7

THANK YOU ,NSH ...

i can work  when i run

I:\HTK\chineseDigitRecog\chineseDigitRecog\training_1>HCompV -C mfcc13.cfg -m -o
 hcompv.hmm -M output -I output\digitSylPhone.mlf -S output\trainFea.scp output\
template.hmm

but  my set is

#NATURALREADORDER = TRUE
SOURCEKIND = ALIEN              
SOURCEFORMAT = ALIEN
HEADERSIZE =0
SOURCERATE =907
TARGETKIND = MFCC_E
TARGETRATE = 100000.0
WINDOWSIZE = 200000.0
PREEMCOEF = 0.975
NUMCHANS = 26
CEPLIFTER = 22
NUMCEPS = 12
USEHAMMING = T
DELTAWINDOW = 2 
ACCWINDOW= 2

 

SOURCERATE WHY IS 907 = ="??

 

 

--- (Edited on 8/15/2012 1:15 pm [GMT-0500] by efstr1126) ---

PreviousNext