WAV FILE TO VEC Objective: To generate *.vec files. Basic requirements: 1. Training voices. 2. M Files: step 1-5, HtkFile_generator.m and ~.fig 3.EXE file: convert, Vector_Formatter, HCopy, HList. 4.config.txt 5. 2 empty folders: mfcc and train. 6. Change matlab working directory to test2. STEP 1: (Generates the script files Hcopy.scp and HList.scp) STEP 2: To generate *.mfcc files using A)Hcopy.exe B)Hcopy.scp C)Config.txt Step 3: To generate i)*.shk files( under mfcc/output folder) from *.mfcc ( in /mfcc folder) using A) HList.exe B) HList.scp ii) Script file ‘Out_Vec_Scp1.test’ to be used with ’convert.exe’ in the next step. Step 4: To generate *.gen file (in mfcc/genoutput folder) from *.shk file Using, Convert.exe and Script file ‘Out_Vec_Scp1.test’ In this step ‘Out_vec.test’ file is generated which is to be used by the vector_formatter in the next step. Step 5: To generate *.vec file (in /Train folder) from *.gen file Using, Vector_formatter.exe and the script file ‘Out_vec.test’ Creating Monophone Models Basic requirements 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Proto_5states_39dim. (923 bytes). HTK_39dpf.config Train.scp Phones0.mlf Phones1.mlf HCompV.exe(to create a new version of proto file under hmm0\model folder : 1,2,3 to generate new version of 1 and vfoors) HRest.exe Monophones0 Monophones1 HERest.exe; to generate hmmdefs and macros sil.hed, command script for HHed.exe HHed.exe Mfiles: step1a.m,step2a.m,step3b.m,step4a.m,step3c.m,step3a.m,step57a.m,step7b,7c,7d.m,step8-10a.m(14 files) Step1: Generate script file Train.scp. (use step1a.m) Step2: Use HCompV.exe ((to create a new version of proto file under \ hmm0 folder : 1,2,3 to generate new version of 1 and vfoors). (Use step 2a.m) status = dos('F:\test2\HCompV -T 1 -C F:\test2\HTK_39dpf.config -S F:\test2\Train.scp -m -v 0.01 -f 0.01 -M F:\test2\hmm0\ F:\test2\proto_5states_39dim'); Step3: generate hmmdefs using monophones0 and new proto. Also create macros using new proto and vfloors. To create hmmdefs : make proto_5states.txt using step3b.m file from new proto then run step4a.m code. To create macros : run step3c.m Xxxxxx….skip…this……Step4: run Hrest.exe using step3a.m status = dos('F:\test2\HRest -T 1 -C F:\test2\HTK_39dpf.config -S F:\test2\Train.scp -I F:\test2\phones0.mlf -L F:\test2\Train\ -M F:\test2\hmm0\ -H F:\test2\hmm0\macros -w 3 -v 0.05 -i 40 -m 1 F:\test2\hmm0\proto_5states_39dim'); Step 5: run sequentially step5a,6a,7a.m( pre requisite:config,train.scp,phones0.mlf,monophones0 and previous hmmdefs with macros). Outcome new hmmdefs and macor status = dos('HERest -A -D -T 1 -C HTK_39dpf.config -I phones0.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm0/macros -H hmm0/hmmdefs -M hmm1 monophones0'); status = dos('HERest -A -D -T 1 -C HTK_39dpf.config -I phones0.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm1/macros -H hmm1/hmmdefs -M hmm2 monophones0'); status = dos('HERest -A -D -T 1 -C HTK_39dpf.config -I phones0.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm2/macros -H hmm2/hmmdefs -M hmm3 monophones0'); Step6: First copy the content of hmm3 to hmm4 Then to fix the silence models run 7b,7c and 7d sequentially to create HMM model with SP(short Pause) Step7: Run step8a file to get hmm5 files. status = dos('HHEd -A -D -T 1 -H hmm4/macros -H hmm4/hmmdefs -M hmm5 sil.hed monophones1'); Step8: Run step9a and step10a. to gen hmm6 and 7. status = dos('HERest -A -D -T 1 -C HTK_39dpf.config -I phones1.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm5/macros -H hmm5/hmmdefs -M hmm6 monophones1'); status = dos('HERest -A -D -T 1 -C HTK_39dpf.config -I phones1.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm6/macros -H hmm6/hmmdefs -M hmm7 monophones1'); Making Triphones from monophones 1. Hmm7/hmmdefs Hmm7/macro files (generated at the last step in generating Monophones model) 2. mlfTolib_generator.exe (Train folder with *.vec and a Train script necessary to generate *.lab) 3. words.mlf ---(collected,not generated) 4. dict---------- ---(collected,not generated) 5. voxforge_lexicon 6. Hvite.exe; to generate aligned.mlf ( dict file(17KB), lab files are needed, also words.mlf are needed) 7. Mktri.led, to use with HLed.exe 8. HLed.exe 9. Perl scripts; maketrihed, fixfulllist.pl, mkclscript.prl 10. Tree1.hed 11. tree_hed_tail.txt, to be added after tree.hed 12. HHed.exe 13. HERest.exe 14. The M-files step11a-25a. Step9: First using step11a.m code create the lab files (make sure that the *.vec files are in Train folder) it will take 2 or three min .The train folder should a subfolder in the working directory Create aligned.mlf using step12a.m status = dos('HVite -A -D -T 1 -l * -o SWT -b SENT-END -C HTK_39dpf.config -H hmm7/macros -H hmm7/hmmdefs -i aligned.mlf -m -t 250.0 150.0 1000.0 -y lab -a -I words.mlf -S train.scp dict monophones1'); Step10: run step13a.m and step14a.m prog sequentially to generate hmm8 and hmm9 files. status = dos('HERest -A -D -T 1 -C HTK_39dpf.config -I aligned.mlf -t 250.0 150.0 3000.0 -S train.scp -H hmm7/macros -H hmm7/hmmdefs -M hmm8 monophones1'); status = dos('HERest -A -D -T 1 -C HTK_39dpf.config -I aligned.mlf -t 250.0 150.0 3000.0 -S train.scp -H hmm8/macros -H hmm8/hmmdefs -M hmm9 monophones1'); Step11: Generate wintri.mlf and triphones1 using step15a.m status = dos('HLEd -A -D -T 1 -n triphones1 -l * -i wintri.mlf mktri.led aligned.mlf') Step12: Make mktri.hed using step16a.m status=dos('C:/perl/bin/perl maketrihed monophones1 triphones1') Step13: step17a.m to generate hmm10 files status = dos('HHEd -A -D -T 1 -H hmm9/macros -H hmm9/hmmdefs -M hmm10 mktri.hed monophones1') Step14: run step18a.m and step19a.m status = dos('HERest -A -D -T 1 -C HTK_39dpf.config -I wintri.mlf -t 250.0 150.0 3000.0 -S train.scp -H hmm10/macros -H hmm10/hmmdefs -M hmm11 triphones1') status = dos('HERest -A -D -T 1 -C HTK_39dpf.config -I wintri.mlf -t 250.0 150.0 3000.0 -s stats -S train.scp -H hmm11/macros -H hmm11/hmmdefs -M hmm12 triphones1') Step15: using global.ded and HDMan.exe generate DICT-TRI and FULLList Run step20a status = dos('HDMan -A -D -T 1 -b sp -n fulllist -g global.ded -l flog dicttri dict') Run step20b STEP16: (step21a.m) status=dos('C:/perl/bin/perl fixfulllist.pl fulllist1 fulllist') step17:(step22a.m) status=dos('C:/perl/bin/perl mkclscript.prl TB 350 monophones0 >> tree.hed') step18: run step22b.m add following lines at the end of tree.hed TR 1 AU "fulllist" CO "tiedlist" ST "trees" step19: (step23a.m) status = dos('HHEd -A -D -T 1 -H hmm12/macros -H hmm12/hmmdefs -M hmm13 tree.hed triphones1') step 20: (step24a.m) status = dos('HERest -A -D -T 1 -T 1 -C HTK_39dpf.config -I wintri.mlf -s stats -t 250.0 150.0 3000.0 -S train.scp -H hmm13/macros -H hmm13/hmmdefs -M hmm14 tiedlist') step21: (step25a.m) status = dos('HERest -A -D -T 1 -T 1 -C HTK_39dpf.config -I wintri.mlf -s stats -t 250.0 150.0 3000.0 -S train.scp -H hmm14/macros -H hmm14/hmmdefs -M hmm15 tiedlist')