VoxForge
The Windows Command Prompt (also called the Windows terminal) is where you will execute all your HTK/Julius commands and scripts, and VoxForge scripts.
Open your Command Prompt window by clicking:
Start>All Programs>Accessories>Command Prompt
Create a new folder in your home directory and call it
'voxforge'. Create another directory within this folder and call
it 'howto'.
Create a file called sample.grammar in your 'voxforge/howto' folder, and add the following:
S : NS_B SENT NS_E SENT: CALL_V NAME_N SENT: DIAL_V DIGIT |
Still in your 'voxforge/howto' folder, create a file called sample.voca, and add the following:
% NS_B <s> sil % NS_E </s> sil % CALL_V PHONE f ow n CALL k ao l % DIAL_V DIAL d ay ah l % NAME_N STEVE s t iy v YOUNG y ah ng % DIGIT FIVE f ay v FOUR f ao r NINE n ay n EIGHT ey t OH ow ONE w ah n SEVEN s eh v ah n SIX s ih k s THREE th r iy TWO t uw ZERO z iy r ow |
For details on the file formats, see Step 1 - Task Grammar, in the Tutorial.
The .grammar and .voca files now need to be compiled into ".dfa" and ".dict" files so that Julius can use them.
Download the Julia mkdfa.jl grammar compiler script to your 'voxforge/bin' folder.
Note: the mkdfa.jl script assumes that the following julius programs:
are accessible from your PATH (which should be the case since they are included as part of the Julius executable you just downloaded). |
The .grammar and .voca files need to have the same file prefix, and this prefix is then specified to the mkdfa.jl script. From a command prompt in your 'voxforge/tutorial' directory, compile your files (sample.grammar and sample.voca) using the following command:
julia ../bin/mkdfa.jl sample
Where 'julia' is the name of the julia programming language; and "../bin/mkdfa.jl" tells Julia to go up one directory, then down into the bin directory to execute the "mkdfa.jl" script; and "sample" is the name of the prefix for your grammar files (i.e. your grammar files are "sample.grammar" and "sample.dfa").
The following shows the expected output from running the mkdfa.jl script:
julia ../bin/mkdfa.jl sample sample.grammar has 3 rules |
The generated sample.dfa and sample.term files contain finite automaton information, and the sample.dict file contains word dictionary information. All are in Julius format.