Cygwin is a Linux-like environment for Windows. It contains
the Bash Shell scripting language and the Perl scripting
language. Both are required to run the HTK Acoustic Model build
scripts.
Download
the latest version of the cygwin setup application (click the 'Install
Cygwin now' button on the top right-hand side of the web page).
Note: that this is not the full Cygwin application.
It is just the setup application that lets your download Cygwin from
the Internet;
Step 2- Install Cygwin
Double-click the Cygwin setup application;
Follow the steps in the setup wizard:
Select install from the Internet:
Select Your Internet Connection - 'Direct Connection' should work OK;
Use the default local package directory:
On the Choose Installation Directory Window:
install your root directory to c:\cygwin (don't install to your Windows
'Program Files' directory ... Cywin has problems with spaces in
directory or file names);
select install for 'All users';
select 'Unix/binary' Default Test File Type;
Choose a Download Site;
When the Select Packages window appears:
click Perl,
then
select the following packages that are under Perl (click on the word
'skip' on the same line as the package to toggle it to 'keep' - which
means to download this particular package):
perl: Larry Wall's Practical Extracting and Report Language
perl_manpages: Perl manpages
Next, while still in the Cygwin Select Packages window:
click Devel, then
select the following packages:
gcc-core - C compiler
make - GNU version of make utility
flex - fast lexical analyzer generator (for compiling Julius)
click Utils, then select:
diffutils - A GNU collection of diff utilities
click Libs, then select:
zlib - the zlib compression and decompression library
Click the 'Next' button and wait as the files download to your PC - this may take a while.
At the command prompts, type perl -v; you should see version information for the Perl scripting language.
HTK
HTK's licence
requires you to register
before you can download the toolkit. The software is open
source but there are limitations on the distribution of the HTK
Toolkit itself. However, there is no limitation on the
distribution of the Acoustic Models you create with the toolkit.
The HTK book is an excellent reference to the toolkit commands.
However, it is written for speech scientists and can be very
confusing to beginners.
Step 3 - Install HTK
Use Windows Explorer to create a new directory in your "c:\cygwin" folder called
"HTK" (see the Cygwin Cheat Sheet for information on Cygwin directory structures). You could use the Cygwin Console, but it is easier just
to use Windows Explorer to create your HTK directory.
Move your downloaded files to your c:\cygwin\HTK directory :
htk-3.x-windows-binary.zip
HTK-samples-3.3.zip
htkbook_html.tar.gz
Install Windows HTK Binaries
Using Windows Explorer:
Right-click the htk-3.x-windows-binary.zip file, and select 'Extract All...' from your right-click menu; and
follow the steps in the extraction wizard to extract the zip file to your HTK directory.
this creates the c:\cygwin\HTK\htk-3.3-windows-binary\htk folder.
Note: do not execute HTK's "install" MS-DOS batch file. This batch
file creates a directory called "HTK.3.3" in your "Program Files"
directory, and copies the HTK executables into it.
Install HTK Samples
Using Windows Explorer:
Right-click the HTK-samples-3.3.zip file and select 'Extract All..." from your right-click menu; and
Follow the
steps in the extraction wizard to extract the zip file to your HTK
directory.
This creates the c:\cygwin\HTK\HTK-samples-3.3\samples folder.
Install HTK Book
Using the Cygwin Console (Start>All Programs>Cygwin>Cygwin Bash Shell):
Use the 'tar' command to extract the HTK Book as follows:
$cd /HTK
$tar -xvzf htkbook_html.tar.gz
This creates the c:\cygwin\HTK\htkbook folder.
Step 4 - Copy HTK Perl Scripts
1. Get the name of your home directory:
Using the Cygwin Console (Start>All Programs>Cygwin>Cygwin Bash Shell)
type 'pwd' (i.e. print working directory)
to find out what your home directory is (in this example my home
directory is called 'Administrator'):
$pwd
/home/Administrator
2. Create voxforge directory
Using Windows Explorer:
go to your c:\cygwin\home\[home directory]
create a sub-folder called 'voxforge'
within voxforge, create another folder called 'HTK_Scripts'
Step 5 - Modify HTK mkclscript.prl Perl Script to work with Cygwin
With
your favourite editor (Windows WordPad will do ...), edit the
mkclscript.prl script (in c:\cygwin\home\[home
directory]\voxforge\HTK_Scripts) by searching for each occurrence of
the Perl 'chop;' command and replacing it with: 'chop;chop;'.
Windows
adds a return character (in addition to the newline character) at the
end of each line of a text file and the second 'chop' command is required to remove it.
Step 6 - testing
See testing in the 'Update Your Path Environment Variable' section.
Julius
Julius
has no limitations on distribution. It uses Acoustic Models in
HTK format, and Grammar files in its own format.
Julius is a large vocabulary continuous speech recognition (LVCSR)
engine. Julius is used in dictation applications.
Julian is a special version of Julius that performs grammar based
speech recognition. Julian is used for command and
control applications.
We will be using the Julian version of Julius for this tutorial.