Archive for the ‘Uncategorized’ Category

Installation under Linux Mint 12

Tuesday, May 1st, 2012

1. I just logged in / downloaded HTK following these instructions. No, I think that I should follow these instructions.

2. Linux Mint terminal:
sudo apt-get install build-essential libx11-dev libasound2-dev

3. Open configure.ac with Geany. remove “-m32″ from line 111.
cd /home/ubuntu/Documents/htk
./configure
make -> error message
make all -> error message
I forgot to run autoconf
make -> error message
./configure
make -> no error message
sudo make install

HTK should be installed now

maketrihed

Thursday, June 11th, 2009

file:///home/liberty/200905/htk/samples/HTKTutorial/maketrihed

HLEd

Sunday, May 31st, 2009

node 345,346,347=HList
348,349,350,
HLMCopy 351,352,353

Node 338; HInit

Tuesday, May 26th, 2009

http://htk.eng.cam.ac.uk/prot-docs/HTKBook/node338_mn.html

339 HInit
340 Function Viterbi alignment
mixture Gaussians – K-Means algorithm – prototype HMM definition – transition matrix
HInit > HRest
341 – Viterbi alignment stage

Installing HTK 3.4.1 on Ubuntu 9.04

Wednesday, May 6th, 2009

liberty@liberty-desktop:~$ cd 200905/htk/htk
liberty@liberty-desktop:~/200905/htk/htk$

./configure
make all
sudo make install

HDecode

liberty@liberty-desktop:~/200905/htk/htk$ cd ..
liberty@liberty-desktop:~/200905/htk$ cd samples
liberty@liberty-desktop:~/200905/htk/samples$ cd HTKDemo
liberty@liberty-desktop:~/200905/htk/samples/HTKDemo$ ./runDemo configs/monPlainM1S1.dcf

liberty@liberty-desktop:~/200905/htk/htk$ make hdecode
liberty@liberty-desktop:~/200905/htk/htk$ sudo make install-hdecode

created gram file

Saturday, April 18th, 2009

I just created the gram file – see HTK book page 25
Now I will try the command HParse gram wdnet
just created 200904 containing the gram file
cd 200904

ubuntu@ubuntu-desktop:~$ cd 200904
ubuntu@ubuntu-desktop:~/200904$ HParse gram wdnet
ubuntu@ubuntu-desktop:~/200904$

copied prompts2wlist to 200904
copied beep-1.0 to 200904

downloaded and extracted htk 3.4.1

Saturday, March 21st, 2009

- downloaded and extracted htk 3.4.1
- cd htk
- ./configure
- make all
- sudu make install

HTK 3.4.1 has been released

Wednesday, March 18th, 2009

HTK 3.4.1 has been released.

trying to run Julian live

Friday, January 16th, 2009

Let’s try to run Julian live.

1. file:///home/ubuntu/voxforge2009/manual/julian.jconf
2. Maybe I need to follow the step 1 – I had skipped that. Or I install the new bug fix release of Simon. I don’t want to use an old version of Julius / Julian. There should be another way to proceed.

voxforge2009 folder

Thursday, January 15th, 2009

I am trying the Voxforge tutorial again. For this purpose, I have created the folder /home/ubuntu/voxforge2009. I will explain the steps that I am doing. The last try ‘voxforge31′ was almost successful. But there was a problem with ‘dx’ phone. So I will restart.

Step 2:
1. prompts file path is: /home/ubuntu/voxforge2009/manual/prompts
2. /home/ubuntu/voxforge2009/prompts2wlist – location is slightly different from the Voxforge tutorial.
3. ubuntu@ubuntu-desktop:~$ cd voxforge2009
4. ubuntu@ubuntu-desktop:~/voxforge2009$ perl prompts2wlist prompts wlist
Unable to open prompts prompts file for reading at prompts2wlist line 16.
-> OK, I don’t have the prompts file in this folder. It is stored in the manual folder (#1)
-> I will try it again:
5. ubuntu@ubuntu-desktop:~/voxforge2009$ perl prompts2wlist manual/prompts manual/wlist
-> OK, I was successful.
6. Adding SENT-END and SENT-START to wlist, take a look at wlist
7. create file: /home/ubuntu/voxforge2009/manual/global.ded
8. create folder: /home/ubuntu/voxforge2009/lexicon/
9. copy lexicon: /home/ubuntu/voxforge2009/lexicon/voxforge_lexicon
-> note: this lexicon is not compatible to the CMU pronouncing dictionary.
10. ubuntu@ubuntu-desktop:~/voxforge2009$ cd manual
ubuntu@ubuntu-desktop:~/voxforge2009/manual$
11. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HDMan -A -D -T 1 -m -w wlist -n monophones1 -i -l dlog dict ../lexicon/voxforge_lexicon
-> now I have: /home/ubuntu/voxforge2009/manual/dict and
/home/ubuntu/voxforge2009/manual/monophones1 and
/home/ubuntu/voxforge2009/manual/dlog
12. created monophones0
13. removed ‘sp’ phone from monophones0
14. created folder: /home/ubuntu/voxforge2009/HTK_Scripts/
14 moved file: /home/ubuntu/voxforge2009/HTK_Scripts/prompts2wlist
15. /home/ubuntu/voxforge31/HTK_Scripts/prompts2mlf
16. renaming folder from /home/ubuntu/voxforge31/HTK_Scripts/ to /home/ubuntu/voxforge31/HTK_scripts/
17. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HDMan -A -D -T 1 -m -w wlist -n monophones1 -i -l dlog dict ../lexicon/voxforge_lexicon
18. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ perl ../HTK_scripts/prompts2mlf words.mlf prompts
-> this created words.mlf
19. /home/ubuntu/voxforge2009/manual/mkphones0.led (see step 4)
20. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HLEd -A -D -T 1 -l ‘*’ -d dict -i phones0.mlf mkphones0.led words.mlf
21. created file: /home/ubuntu/voxforge31/mkphones1.led
22. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HLEd -A -D -T 1 -l ‘*’ -d dict -i phones1.mlf mkphones1.led words.mlf

This has to be continued with step 5. I will continue later.

Let’s go to step 5 now:
23. file:///home/ubuntu/voxforge2009/manual/codetrain.scp
24. file:///home/ubuntu/voxforge2009/manual/wav_config
25. /home/ubuntu/voxforge2009/train – folder created
26. /home/ubuntu/voxforge2009/train/wav – folder created
27. copy wav files to the previously created folder. Done.
28. ubuntu@ubuntu-desktop:~$ cd voxforge2009/manual
ubuntu@ubuntu-desktop:~/voxforge2009/manual$
29. /home/ubuntu/voxforge2009/train/mfcc – folder created
30. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HCopy -A -D -T 1 -C wav_config -S codetrain.scp
31. file:///home/ubuntu/voxforge2009/manual/proto
32. file:///home/ubuntu/voxforge2009/manual/config
33. file:///home/ubuntu/voxforge2009/manual/train.scp
34. /home/ubuntu/voxforge2009/hmm0 – folder created
35. move hmm0 folder, new location: /home/ubuntu/voxforge2009/manual/hmm0
36. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HCompV -A -D -T 1 -C config -f 0.01 -m -S train.scp -M hmm0 proto
-> created file:///home/ubuntu/voxforge2009/manual/hmm0/proto
-> created file:///home/ubuntu/voxforge2009/manual/hmm0/vFloors
37. file:///home/ubuntu/voxforge2009/manual/hmm0/monophones0
38. rename monophones0 to hmmdefs
39. modifiying hmmdefs – lots of pasting
40. file:///home/ubuntu/voxforge2009/manual/hmm0/macros
41. hmm1 … hmm9 created
42. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HERest -A -D -T 1 -C config -I phones0.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm0/macros -H hmm0/hmmdefs -M hmm1 monophones0
-> created: file:///home/ubuntu/voxforge2009/manual/hmm1/hmmdefs
-> created: file:///home/ubuntu/voxforge2009/manual/hmm1/macros
43. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HERest -A -D -T 1 -C config -I phones0.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm1/macros -H hmm1/hmmdefs -M hmm2 monophones0
-> file:///home/ubuntu/voxforge2009/manual/hmm2/hmmdefs
-> file:///home/ubuntu/voxforge2009/manual/hmm2/macros
44. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HERest -A -D -T 1 -C config -I phones0.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm2/macros -H hmm2/hmmdefs -M hmm3 monophones0
-> file:///home/ubuntu/voxforge2009/manual/hmm3/hmmdefs
-> file:///home/ubuntu/voxforge2009/manual/hmm3/macros
-> GREAT, I am one step further. The next thing to do is to follow the step 7.

Question: Do you know what HMM means? If not, read the HMM tutorial. I find it very helpful to think about the graph theory (nodes and arcs / vertices) . The concept of the graph theory is very simple. And you should understand the basics (just the basics is completely sufficient) of the graph theory when you are interested in artificial intelligence / speech recognition. Think of the world a a giant graph. HMM is in my opinion just something like a special case of the graph theory. That’s all.

I should continue with step 7 now. But it is pretty monotone to follow the Voxforge tutorial. Maybe I should drink a cup of coffee now, and then continue.

Step 7:
45. copy content of hmm3 to hmm4
-> file:///home/ubuntu/voxforge2009/manual/hmm4/hmmdefs
-> file:///home/ubuntu/voxforge2009/manual/hmm4/macros
46. changed TRANSP to 3, changed matrix
47. changed NUMSTATES to 3
48. deleted STATE 3 and STATE 4 – is that correct? No, undo.
49. removing STATE 2
50. removing STATE 4
51. changing STATE 3 to STATE 2
52. creating sil.hed -> file:///home/ubuntu/voxforge2009/manual/sil.hed
53. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HHEd -A -D -T 1 -H hmm4/macros -H hmm4/hmmdefs -M hmm5 sil.hed monophones1
54. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HERest -A -D -T 1 -C config -I phones1.mlf -t 250.0 150.0 3000.0 -S train.scp -H hmm5/macros -H hmm5/hmmdefs -M hmm6 monophones1
55. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HERest -A -D -T 1 -C config -I phones1.mlf -t 250.0 150.0 3000.0 -S train.scp -H hmm6/macros -H hmm6/hmmdefs -M hmm7 monophones1
-> It seems to have worked out. Fine.

Step 8:
56. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HVite -A -D -T 1 -l ‘*’ -o SWT -b SENT-END -C 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> HVite_log
-> this created file:///home/ubuntu/voxforge2009/manual/aligned.mlf
57. take a look at file:///home/ubuntu/voxforge2009/manual/HVite_log
58. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ HERest -A -D -T 1 -C config -I aligned.mlf -t 250.0 150.0 3000.0 -S train.scp -H hmm7/macros -H hmm7/hmmdefs -M hmm8 monophones1
59. HERest -A -D -T 1 -C config -I aligned.mlf -t 250.0 150.0 3000.0 -S train.scp -H hmm8/macros -H hmm8/hmmdefs -M hmm9 monophones1

Everything went fine so far. Let’s go to step 9:
60. file:///home/ubuntu/voxforge2009/manual/mktri.led
61. HLEd -A -D -T 1 -n triphones1 -l ‘*’ -i wintri.mlf mktri.led aligned.mlf
-> file:///home/ubuntu/voxforge2009/manual/wintri.mlf
-> file:///home/ubuntu/voxforge2009/manual/triphones1
62. HTK_scripts/maketrihed – perl ../HTK_scripts/maketrihed monophones1 triphones1
-> file:///home/ubuntu/voxforge2009/manual/mktri.hed
63. created folders: hmm10, hmm11, hmm12
64. HHEd -A -D -T 1 -H hmm9/macros -H hmm9/hmmdefs -M hmm10 mktri.hed monophones1
-> obviously, there is a warning (indicated by the minus-sign): “WARNING [-2631] ApplyTie: Macro T_sil has nothing to tie of type t in HHEd” – this might be a problem, but I don’t know. Maybe I will check that later, maybe not.
65. HERest -A -D -T 1 -C config -I wintri.mlf -t 250.0 150.0 3000.0 -S train.scp -H hmm10/macros -H hmm10/hmmdefs -M hmm11 triphones1
-> “WARNING [-2331] UpdateModels: m-eh+zh[465] copied: only 2 egs
in HERest” – and lots of similar warnings.
66. HERest -A -D -T 1 -C 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
-> lots of warnings like in #65

Now it is time to go to step 10.
67. [several steps are missing because I didn't save the changes, and lost a few changes.]
68. ubuntu@ubuntu-desktop:~/voxforge2009/manual$ perl ../HTK_scripts/mkclscript.prl TB 350 monophones0 >> tree.hed
69. modified tree.hed
70. created hmm13, hmm14, hmm15
71. HHEd -A -D -T 1 -H hmm12/macros -H hmm12/hmmdefs -M hmm13 tree.hed triphones1
72. HERest -A -D -T 1 -T 1 -C 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
73. HERest -A -D -T 1 -T 1 -C 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

Content of voxforge31 folder

Wednesday, January 14th, 2009

voxforge31 folder content:

/home/ubuntu/voxforge31/hmm0
/home/ubuntu/voxforge31/hmm1
/home/ubuntu/voxforge31/hmm2
/home/ubuntu/voxforge31/hmm3
/home/ubuntu/voxforge31/hmm4
/home/ubuntu/voxforge31/hmm5
/home/ubuntu/voxforge31/hmm6
/home/ubuntu/voxforge31/hmm7
/home/ubuntu/voxforge31/hmm8
/home/ubuntu/voxforge31/hmm9
/home/ubuntu/voxforge31/codetrain.scp
/home/ubuntu/voxforge31/config
/home/ubuntu/voxforge31/dict
/home/ubuntu/voxforge31/dlog
/home/ubuntu/voxforge31/global.ded
/home/ubuntu/voxforge31/mkphones0.led
/home/ubuntu/voxforge31/mkphones1.led
/home/ubuntu/voxforge31/monophones0
/home/ubuntu/voxforge31/monophones1
/home/ubuntu/voxforge31/phones0.mlf
/home/ubuntu/voxforge31/phones1.mlf
/home/ubuntu/voxforge31/prompts
/home/ubuntu/voxforge31/prompts2mlf
/home/ubuntu/voxforge31/prompts2wlist
/home/ubuntu/voxforge31/proto
/home/ubuntu/voxforge31/sample1.mfc
/home/ubuntu/voxforge31/sample1.wav
/home/ubuntu/voxforge31/sample2.mfc
/home/ubuntu/voxforge31/sample2.wav
/home/ubuntu/voxforge31/sample3.mfc
/home/ubuntu/voxforge31/sample3.wav
/home/ubuntu/voxforge31/sample4.mfc
/home/ubuntu/voxforge31/sample4.wav
/home/ubuntu/voxforge31/sample5.mfc
/home/ubuntu/voxforge31/sample5.wav
/home/ubuntu/voxforge31/sample6.mfc
/home/ubuntu/voxforge31/sample6.wav
/home/ubuntu/voxforge31/sample7.mfc
/home/ubuntu/voxforge31/sample7.wav
/home/ubuntu/voxforge31/sample8.mfc
/home/ubuntu/voxforge31/sample8.wav
/home/ubuntu/voxforge31/sample9.mfc
/home/ubuntu/voxforge31/sample9.wav
/home/ubuntu/voxforge31/sample10.mfc
/home/ubuntu/voxforge31/sample10.wav
/home/ubuntu/voxforge31/sample11.mfc
/home/ubuntu/voxforge31/sample11.wav
/home/ubuntu/voxforge31/sample12.mfc
/home/ubuntu/voxforge31/sample12.wav
/home/ubuntu/voxforge31/sample13.mfc
/home/ubuntu/voxforge31/sample13.wav
/home/ubuntu/voxforge31/sample14.mfc
/home/ubuntu/voxforge31/sample14.wav
/home/ubuntu/voxforge31/sample15.mfc
/home/ubuntu/voxforge31/sample15.wav
/home/ubuntu/voxforge31/sample16.mfc
/home/ubuntu/voxforge31/sample16.wav
/home/ubuntu/voxforge31/sample17.mfc
/home/ubuntu/voxforge31/sample17.wav
/home/ubuntu/voxforge31/sample18.mfc
/home/ubuntu/voxforge31/sample18.wav
/home/ubuntu/voxforge31/sample19.mfc
/home/ubuntu/voxforge31/sample19.wav
/home/ubuntu/voxforge31/sample20.mfc
/home/ubuntu/voxforge31/sample20.wav
/home/ubuntu/voxforge31/sample21.mfc
/home/ubuntu/voxforge31/sample21.wav
/home/ubuntu/voxforge31/sample22.mfc
/home/ubuntu/voxforge31/sample22.wav
/home/ubuntu/voxforge31/sample23.mfc
/home/ubuntu/voxforge31/sample23.wav
/home/ubuntu/voxforge31/sample24.mfc
/home/ubuntu/voxforge31/sample24.wav
/home/ubuntu/voxforge31/sample25.mfc
/home/ubuntu/voxforge31/sample25.wav
/home/ubuntu/voxforge31/sample26.mfc
/home/ubuntu/voxforge31/sample26.wav
/home/ubuntu/voxforge31/sample27.mfc
/home/ubuntu/voxforge31/sample27.wav
/home/ubuntu/voxforge31/sample28.mfc
/home/ubuntu/voxforge31/sample28.wav
/home/ubuntu/voxforge31/sample29.mfc
/home/ubuntu/voxforge31/sample29.wav
/home/ubuntu/voxforge31/sample30.mfc
/home/ubuntu/voxforge31/sample30.wav
/home/ubuntu/voxforge31/sample31.mfc
/home/ubuntu/voxforge31/sample31.wav
/home/ubuntu/voxforge31/train.scp
/home/ubuntu/voxforge31/VoxForgeDict
/home/ubuntu/voxforge31/wav_config
/home/ubuntu/voxforge31/wlist
/home/ubuntu/voxforge31/words.mlf

When I type into the console, the following is written:

ubuntu@ubuntu-desktop:~/voxforge31$ HERest -A -D -T 1 -C config -I phones0.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm0/macros -H hmm0/hmmdefs -M hmm1 monophones0

- I copied hmm0/hmmdefs to hmm0/monophones0, but this didn’t solve my problem.
- I edited train.scp several times, but changing the path prefixes didn’t help.
- Maybe I should check this out. I looked here, but wasn’t successful.

modified the paths in codetrain.scp

Wednesday, January 14th, 2009

- modified the paths in codetrain.scp
- created wav_config
- cd voxforge31
- HCopy -A -D -T 1 -C wav_config -S codetrain.scp
->> error occured, probably the syntax “../sample1.wav ../sample1.mfc” is wrong
- trying “./sample1.wav ./sample1.mfc”
->> OK, it worked out

now I am having the following files
- codetrain.scp
- dict
- dlog
- global.ded
- mkphones0.led
- mkphones1.led
- monophones0
- monophones1
- phones0.mlf
- phones1.mlf
- prompts
- prompts2mlf
- prompts2wlist
- sample1.mfc
- sample1.wav
- VoxForgeDict
- wav_config
- wlist
- words.mlf

+++ +++
- created proto file
- created config file
- created/modified train.scp
- replacing ‘../train/mfcc/sample1.mfc’ with ‘./sample1.mfc’
- creating folder hmm0
- HCompV -A -D -T 1 -C config -f 0.01 -m -S train.scp -M hmm0 proto
- now I have /hmm0/proto and /hmm0/VFloors
- saved monophones0 in hmm0 folder
- putting phones in double quotes
- it looks like: ~h “ae”
~h “b”
monophones0-backup created, might need it again
- renaming monophones0 to hmmdefs
- copied the content of vFloors
- pasted it into an empty file
- saved it as macros
- copied the first three lines of proto
- paste them into macros at the beginning
- switching to voxforge31
- creating hmm1, hmm2, … , hmm9 folders
- HERest -A -D -T 1 -C config -I phones0.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm0/macros -H hmm0/hmmdefs -M hmm1 monophones0
->> Error occured
- Maybe train.scp is wrong – wrong content, changing “./sample1.mfc” to “../sample1.mfc”
->> Error again, replaced with ‘*/sample1.mfc’
->> didnt work out again, undo change

SENT-END SENT-START

Monday, January 12th, 2009

Step 2:
- copied prompts to voxforge31
- prompts2wlist
- $ cd voxforge31
- ubuntu@ubuntu-desktop:~/voxforge31$ perl prompts2wlist prompts wlist
- SENT-END
SENT-START
- global.ded
- VoxForgDict
- ubuntu@ubuntu-desktop:~/voxforge31$ HDMan -A -D -T 1 -m -w wlist -n monophones1 -i -l dlog dict VoxForgeDict
- monophones0 created (sp removed)

Step 4:
- ubuntu@ubuntu-desktop:~/voxforge31$ perl prompts2mlf words.mlf prompts
- mkphones0.led
- ubuntu@ubuntu-desktop:~/voxforge31$ HLEd -A -D -T 1 -l ‘*’ -d dict -i phones0.mlf mkphones0.led words.mlf
- mkphones1.led
- HLEd -A -D -T 1 -l ‘*’ -d dict -i phones1.mlf mkphones1.led words.mlf

Step 5:
- has to be done next.

31 samples from step 3

Monday, January 12th, 2009

I just record the 31 samples from step 3. Should I upload them?  Maybe I should do that.  Or maybe I will do that later.

99 sample sentences #40

Sunday, January 11th, 2009

I am now downloading 99 sample sentences #40. I will try this way. Then I converted the FLAC files to wav files. Let’s take a look at step 2. Then I executed the following command:

ubuntu@ubuntu-desktop:~$ perl prompts2wlist ./examininghtk/40/prompts.txt ./examininghtk/40/wlist

This created the wlist. Then I added SENT-END and SENT-START. Then I created global.ded. Copying the voxforge_lexicon to the folder. And now:

ubuntu@ubuntu-desktop:~$ cd ./examininghtk/40/

And now:

ubuntu@ubuntu-desktop:~/examininghtk/40$ HDMan -A -D -T 1 -m -w wlist -n monophones1 -i -l dlog dict voxforge_lexicon

Obviouly, the lexicon isn’t big enough. I should try a bigger lexicon VoxForgeDict. But this doesn’t solve my problem. There is something wrong with the punktuation, I think. I should remove the sentence marks. I did this with the gedit replace function.

And now (after moving prompts2wlist):

ubuntu@ubuntu-desktop:~/examininghtk/40$ perl prompts2wlist prompts.txt wlist

And now:

ubuntu@ubuntu-desktop:~/examininghtk/40$ HDMan -A -D -T 1 -m -w wlist -n monophones1 -i -l dlog dict VoxForgeDict

But 30 words are missing. I need to capitalize the words. Maybe I should try this script. This script is too simple, I need a different one. I did the conversion with OpenOffice.org. Result: “237 words processed, 19 missing” – that looks quite good.

renaming sample1.wav to sample1.lab

Sunday, January 11th, 2009

I read this discussion because I get an error message when executing the command:

ubuntu@ubuntu-desktop:~$ HERest -A -D -T 1 -C config -I phones0.mlf -t 250.0 150.0 1000.0 -S train.scp -H hmm0/macros -H hmm0/hmmdefs -M hmm1 monophones0

Now I get the message that the string is too long. I think that it is wrong to change the suffix. I will revert that.

perl prompts2wlist prompts wlist

Sunday, January 11th, 2009

I just executed the following command following the instructions in step 2:

ubuntu@ubuntu-desktop:~$ perl prompts2wlist prompts wlist

The wlist has been created by the perl script. Then I added “SENT-START” and “SENT-END”. The file looks like this wlist.

I just created the file global.ded that has the following content:

AS sp
RS cmu
MP sil sil sp

I downloaded the voxforge_lexicon into my home folder. Then I executed the following command:


ubuntu@ubuntu-desktop:~$ HDMan -A -D -T 1 -m -w wlist -n monophones1 -i -l dlog dict voxforge_lexicon

The result is the two files monophones1 and dict.

Overview

Sunday, January 11th, 2009

Linux: Download HTK, Julius & Audacity

Step 1 – what is the purpose of this step? Maybe I should follow the instructions in this step? Maybe I have forgotten the begin-quotes and the end-quotes.

Create files: proto, config, train.scp

Sunday, January 11th, 2009

I have to create a proto file. I just did that. Now I have to create a config file. Done. Now I have to adapt the train.scp file. I will try the following text (last line is empty):


./sample1.mfc
./sample2.mfc

Now I will type into the terminal:

HCompV -A -D -T 1 -C config -f 0.01 -m -S train.scp -M hmm0 proto

It was not possible to save the result. Now I create a folder with the name hmm0. Hopefully, this will work out. It seems to have worked. The folder hmm0 contains now two files: proto and vFloors.

Now I create the file /home/ubuntu/hmm0/hmmdefs.
Now I will copy the file monophones0 to the hmm0 folder, then rename it to hmmdefs (after deleting the previously created hmmdefs file). The explanation is bad, sorry for that. But I hope that you understand what I mean. Now I am following the instructions in step 6 (scroll down a little bit). I have added to each line ‘~h ‘. Then I added after each line the BEGINHMM -  ENDHMM block.

I hope that I didn’t forget a line. It was a lot of pasting. Now I added a blank line at the end of the file. My hmmdefs file looks similar like this file.

Now I create the file /home/ubuntu/hmm0/macros. I copied the content of the file vFloors to the file macros. I copied the first three lines from proto, and pasted them to the beginning of macros.

Create codetrain.scp

Sunday, January 11th, 2009

Now I want to create the file codetrain.scp. This is explained in Step 5. The goal is to convert wav files into MFCC files. I don’t know what exactly that means. But I hope to produce a result even though I don’t understand the meaning of the mel frequency cepstrum.

I need a file with the name wav_config. The conversion will be done by the HCopy command. But first, I have to record the sample files. This is explained in step 3. Which resolution and bitrate should I use? Does that matter? I will have to store the wav files in the correct directory.

I just created just two sample files: sample1.wav and sample2.wav. That should be enough for the moment. Now I have to adapt the codetrain.scp file for my needs. I will try it with the following content (blank line at the end of the document):

../sample1.wav ../sample1.mfc
../sample2.wav ../sample2.mfc

I just created the file wav_config. Now I am trying to execute the following command:

ubuntu@ubuntu-desktop:~$ HCopy -A -D -T 1 -C wav_config -S codetrain.scp

But an error message appears:

ERROR [+6210] OpenWaveInput: Cannot open waveform file ../sample1.wav

Maybe there is some kind of error with the paths. So I changed the content of the file codetrain.scp:

./sample1.wav ./sample1.mfc
./sample2.wav ./sample2.mfc

Now it seems to have worked. The files sample1.mfc and sample2.mfc have been created. I am happy that I am making progress.

Downloading dict file from Voxforge

Sunday, January 11th, 2009

I just downloaded the dict file from Voxforge.

Then I executed the HLEd command again:

ubuntu@ubuntu-desktop:~$ HLEd -A -D -T 1 -l ‘*’ -d dict -i phones0.mlf mkphones0.led words.mlf

I just created a file with the name mkphones1.led and the content (blank line at the end of the document):

EX
IS sil sil

This was explained in Step 4. Then I ran the following command in the terminal:

ubuntu@ubuntu-desktop:~$ HLEd -A -D -T 1 -l '*' -d dict -i phones1.mlf mkphones1.led words.mlf

This created the file phones1.mlf.

“Cannot find word DIAL in dictionary”

Thursday, January 8th, 2009

I followed these instructions. I created a file with the name mkphones0.led. It has the following content (the last line is empty – this is not beeing displayed here):

EX
IS sil sil
DE sp

Then I executed the HLEd command:

ubuntu@ubuntu-desktop:~$ HLEd -A -D -T 1 -l '*' -d dict -i phones0.mlf mkphones0.led words.mlf
HLEd -A -D -T 1 -l * -d dict -i phones0.mlf mkphones0.led words.mlf

No HTK Configuration Parameters Set

Editing file: sample1.lab
ERROR [+1232]  NumParts: Cannot find word DIAL in dictionary
FATAL ERROR - Terminating program HLEd
ubuntu@ubuntu-desktop:~$

Ok, an error occured. Maybe I should try to examine the dict file. At the moment, the dict file doesn’t contain any entry. The dict file is empty. I should change that.

prompts2mlf words.mlf prompts

Thursday, January 8th, 2009

I just read this discussion again. Then I took a look into the VoxForge tutorial. I created an empty file with the name prompts in my home folder. This is the path to the file:

/home/ubuntu/prompts

I copied / pasted these lines into the prompts file. Then I opened a terminal. This was displayed by the terminal:

ubuntu@ubuntu-desktop:~$ perl /home/ubuntu/voxforge/HTK_scripts/prompts2mlf words.mlf prompts
writing to mlf file words.mlf
writing to words.mlf file done
ubuntu@ubuntu-desktop:~$

A file with the name words.mlf has been created in my home folder. It has this content.

prompts2wlist

Friday, January 2nd, 2009

I typed into the terminal:

ubuntu@ubuntu-desktop:~$ perl /home/ubuntu/bin/htk/samples/HTKTutorial/prompts2wlist myprompts wlist

It worked out. For details see HTKbook page 26.

LNewMap

Friday, January 2nd, 2009

I typed (compare page 207):
ubuntu@ubuntu-desktop:~$ LNewMap -f WFC Monitor empty.wmap

The file empty.wmap contains the following lines:
Name = Monitor
SeqNo = 0
Entries = 0
EscMode = RAW
Fields = ID,WFC
\Words\

These are my first steps with HTK. It is pretty difficult.

mkdir holmes.0

Friday, January 2nd, 2009

page 2.. – I just typed into the terminal $ mkdir holmes.0

page 2.. then I typed $ LNewMap -f WFC Holmes empty.wmap