Click here to register.

Windows: Download Cygwin, HTK, Julius and Audacity

 Click here for the Linux version of this How-to

Cygwin

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. 

Step 1 - Download Cygwin

  1. Go to http://www.cygwin.com/;
  2. 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:
  1. click Perl,
  2. 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

cygwin_SelectPackages.jpg

Next, while still in the Cygwin Select Packages window:

  1. 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)
  2. click Utils, then select:
    • diffutils - A GNU collection of diff utilities
  3. 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.

Step 3 - testing your Cygwin install

  1. Click Start>All Programs>Cygwin>Cygwin Bash Shell;
  2. 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.

Step 1 - Register with HTK 

Step 2 - Download HTK Toolkit

Download the latest versions of the following packages: 

Download the HTK Book:

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'
3. Copy the following scripts
from:
  • c:\cygwin\HTK\htk-samples-3.3\samples\RMHTK\perl_scripts:
      • mkclscript.prl
  • c:\cygwin\HTK\htk-samples-3.3\samples\HTKTutorial:
      • maketrihed
      • prompts2mlf
      • prompts2wlist
to:
  •  c:\cygwin\home\[home directory]\voxforge\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. 

Step 1 - Download Windows version of Julius

Step 2 - Extract Julius

Using Windows Explorer:
  1. Change directory to c:\cygwin;
  2. Create a new directory called 'Julius';
  3. Copy your julius-3.5-win32bin.zip zip file to your new folder (i.e. 'c:\cygwin\Julius');
  4. Extract the Julius zip file:
    • right click the julius-3.5-win32bin.zip file
    • select 'Extract all...' from the right-click menu;
    • in 'Select a folder to extract files to' put in the following path:
C:\cygwin\Julius
  1.  
    • the extract process creates some files and these new directories
C:\cygwin\Julius\bin
C:\cygwin\Julius\doc
C:\cygwin\Julius\support
 

Step 3 - testing

See testing in the 'Update Your Path Environment Variable' section. 
 

Update Cygwin Path

Step 1 - Update your path environment variable to include HTK and Julius

1. from Windows Explorer, use your favourite editor to edit:

c:/cygwin/etc/bash.bashrc

and add the following lines:  

PATH=/Julius/bin:/HTK/htk-3.3-windows-binary/htk:$PATH
export PATH

2. close any open Cygwin consoles for the change to take effect
 

Step 2 - Testing Your HTK/Julius Install

  • Open a Cygwin Console window:
    • Click Start>All Programs>Cygwin>Cygwin Bash Shell;
  • Type in "HVite" in the Cygwin Console;
if your system lists all the options available to the hvite command, then HTK is installed properly.
  • Type in "julian" in the Cygwin Console;
if your system displays version information for Julius, then Julius is installed properly;
  • If you don't see the expected results, review your installation steps for Julius or HTK to determine where you might have made an error.

Audacity

Step 1 - Download Audacity 

  1. Go to http://audacity.sourceforge.net/download/windows; and download the latest version of the Audacity audio editor;

Step 2 - Install Audacity

  1. Double-click "audacity-win-1.x.x" setup file;
  2. Follow the steps in the setup wizard;

Step 3 - Testing

  • Click Start>All Programs>Audacity.

 


Comments

Click the 'Add' link to add a comment to this page; click the 'Read More' link to view replies to a posted comment.

AddSearch

error
By hamid - 9/4/2008 - 1 Replies

Hi,

when I want update my path environment variable it gives me error and testing HTK/julius dosen't gives me the expected results.
when I open Cygwin it gives me this:

  bash: $'\r': comand not found
  bash: $'\r': comand not found
  ': not a valid identifier
  bash: $'\r': comand not found


what should I do?

best regards,
Hamid.

Makefile Errors?
By Ramen - 8/8/2008 - 1 Replies

I am trying to follow the instructions listed above for installing HTK.   I am using a 32-bit system.  I get as far as running

$./configure --prefix=/home/yourusername/bin/htk-3.4

But when I try to run make all, I get about 800 errors. At the top of the list of errors, my terminal says,

"HGraf.c:73:77: error: X11/Xlib.h: No such file or directory
HGraf.c:74:23: error: X11/Xutil.h: No such file or directory
HGraf.c:75:21: error: X11/Xos.h: No such file or directory
HGraf.c:77:27: error: X11/keysymdef.h: No such file or directory"

and then it has several lines of stuff looking like,

"HGraf.c:87: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token"

 Does anyone know what's going on here/how I can fix this?

 

By the way, I coculd not find a module to make my version of GCC compatible with 3.4.  Instead, I simply downloaded GCC 3.4 and edited the Makefile so that it would run GCC 3.4 instead of my new version of GCC.

 

Thanks!

Automated Audio Segmentation accuracy
By Sergey - 4/18/2008 - 1 Replies Hi Ken,
I posted the following message yesterday, but some how I did it in a wrong plase (http://www.voxforge.org/home/dev),
and I couldn't find out how to move it here. So I'm just posting it again (but, hopefully, to the right plase now ;)
-----------------------------------------------------------
On 32bit version of Ubuntu HTK compiled without a problem.
Then I followed the tutorial "Automated Audio Segmentation Using Forced Alignment" without a hitch up to step 6.
In Audacity I see a considerable misalignement between audio and labels.
For example in the phrase "Chapter Four, Part One" the audio corresponding to label "part" contains sounds "part one",
and the audio corresponding to label "one" contains only silence.
Is it a normal misalignement or am I doing something wrong?
-----------------------------------------------------------
Thanks a lot,
--Sergey

Segmentation Script
By Sergey - 4/18/2008 - 2 Replies

Hello,
I am trying to perform "Step 7 - Run the Segmentation Script" of the "Automated Audio Segmentation Using Forced Alignment"
but when I try to download the script http://www.voxforge.org/home/dev/autoaudioseg/htksegment_pl2.txt I get a page saying:
"Permission Denied! You do not have sufficient privileges to access this page." Please help.
Thanks a lot,
--Sergey

P.S. I did login first, of course. 

HTK comple error.
By Sergey S. - 4/12/2008 - 4 Replies

Hello, 

I am trying to compile HTK-3.4 on Ubuntu 7.10 but I get this error:

 make all

...

/usr/bin/ld: skipping incompatible /usr/bin/../lib/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libX11.a when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libX11.a when searching for -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make[1]: *** [HSLab] Error 1
make[1]: Leaving directory `/home/serg/bin/htk/HTKTools'
make: *** [htktools] Error 1

Any idea what might be wrong?

Thanks in advance,

--Sergey 

Julius 4.0.1
By kmaclean - 3/12/2008

Some compile problems with Julius 4.0 on Cygwin have been fixed in Julius 4.0.1

 

 

Compiling HTK 3.4 on Windows XP
By kmaclean - 9/30/2007
  • See Ivan A. Uemlianin's blog site article:  Compiling HTK 3.4 on Windows XP -  covers compilation with Visual C++ 2005 Express Edition;
  • Arlindo Vega has a webpage on compiling HTK with Visual Studio 6 (VC6), Visual Studio .NET 2003 (VC7) and Visual Studio 2005 (VC8)



 

 

untitled
By sws - 2/1/2008 i had same problem and it works when i put cygwin1.dll , cygiconv-2.dll and cygz.dll in my windows system file

error in compiling julian
By amza - 1/7/2008 - 2 Replies

I compile julian from source (julius-3.5.2.tar.gz, and then extracts it), because I need julian, not julius, by typing the command as follows:

$./configure --prefix=/home/riset/bin/julius-3.5.2  --enable-julian

The compile didn't work well because there are errors as follows:

$ ./configure --prefix=/home/riset/bin/julius-3.5.2 --enable-julian >a.txt
./configure: line 1033: cmp: command not found
./configure: line 714: cmp: command not found
configure: warning: no iconv, gram2sapixml.pl may not work
./configure: line 1331: cmp: command not found
./configure: line 1203: cmp: command not found
./configure: line 2009: cmp: command not found
configure: warning: not found
configure: warning: libsndfile enables AIFF AU SND NIST format for Julius.
It's available at http://www.mega-nerd.com/libsndfile/
./configure: line 3094: cmp: command not found

I don't understand the command "cmp" in "configure" file, because the file is already available. Can you help me? I haven't been able to run julian yet since 3 weeks ago.  Thank you.

 

~amza 

 

 

error in compiling HTK and Julius
By hazel - 1/6/2008 - 1 Replies

1. I have already configured HTK by using command "./configure .......", but when I type in "make all" on cygwin bash shell, there is errors as follows:

$ make all
make[1]: Entering directory `/home/riset/bin/htk-3.3/HTKLib'
gcc -Wall -Wno-switch -g -O2 -I.    -c -o HShell.o HShell.c
HShell.c: In function `KeyPressed':
HShell.c:1487: error: `FIONREAD' undeclared (first use in this function)
HShell.c:1487: error: (Each undeclared identifier is reported only once
HShell.c:1487: error: for each function it appears in.)
make[1]: *** [HShell.o] Error 1
make[1]: Leaving directory `/home/riset/bin/htk-3.3/HTKLib'
make: *** [all] Error 1

2. I also have extracted julius-3.5.3 to "/home/riset/bin". When I compiled julian by typing:

$./configure --prefix=/home/riset/bin/julius-3.5.3  --enable-julian

    there is an error as follows:

bash: $./configure: No such file or directory

Can you help me to solve these two problems, please? Thank you.

 

~hazel 

 

compile and install htk
By amza - 12/31/2007 - 6 Replies

When I configured HTK by exceuting command:

$./configure --prefix=/home/yourusername/bin/htk-3.3

There is an error like this:

bash: ./configure: No such file or directory

How to solve this problem? Thank you... 

HTK INSTALLATION
By kat_wills - 12/28/2007 - 1 Replies

Hi,

It is about installation of htk.I already have htk installed on my linux system,but the location of installation is different from the steps specified on this tutorial.I have tried installing multiple copies but it did not work.

Since htk has already been installed and working,can I skip the section on htk and focus on other parts of the tutorials or must it be installedfollowing your steps.

 

cheers. 

 

error in testing julius
By amza - 11/22/2007 - 11 Replies I have followed all directions, but the julius testing doesn't work. When I typed "julian" on Cygwin Bash Shell, it doesn't display the version of Julius, it's just blank. I don't know what is missing when installing julius, I have done all steps. Can you help me? Thank you.

ERROR TESTING JULIUS
By rovira74 - 10/20/2007 - 3 Replies

Hi,

I was unable to test julius installation at the prompt as directed but when I typed julian,it gave the version.

Was there any error or are 'julius' and 'julian' commands the same