Click here to register.

Linux: Download HTK, Julius & Audacity

Click here for the Windows version of this tutorial 

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 models you create with the toolkit.

Step 1 - Register with HTK 

Step 2 - Download HTK Toolkit and Samples

Create a new directory in your home directory called 'bin', it should have the following path (replace 'yourusername' with the user name you are using on your system):

  • /home/yourusename/bin 

click the following links:

and save them to your new bin directory.

Step 3 - Download HTK Book

Click the following link: 

and save it to your new bin directory.

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 4 - Unpack you source files

Extract the files using:

  • Nautilus (right click each tar/gzipped file and click extract here); or
  • use tar from the command line for the following files:
    • tar -xvzf HTK-3.4-alpha.tar.gz
    • tar -xvzf HTK-samples-3.4-alpha.tar.gz
    • tar -xvzf htkbook_html.tar.gz

this should create the following directories in your bin folder:

  • htk-3.4
  • samples
  • htkbook

move the 'samples' and 'htkbook' directories to your htk-3.4 folder.

Step 5 - Compile & Install HTK

Compiler version

If you have a newer version of the gcc compiler (version 4 or above), you will need to install gcc version 3.4 compatibility modules so that HTK will compile properly. Use gcc's version command to see which version is installed on your system:

$gcc -v

Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)


If you have version 4.0 or above (I have version 4.3.0) use yum to install the required files to your system:

$su

#yum install compat-gcc-34-c++ compat-gcc-34

32-bit Systems

After unpacking the sources, open a command line terminal and go to the /hom/yourusername/bin/htk3.4 directory where you downloaded your files. 

configure 

The default location for binaries is "/usr/local" which will put the tools in "/usr/local/bin".  You need to change this default location using the "./configure" script to specify where you want the binaries installed:

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

This directs the make command to put all your binaries in the following folder:

  • /home/yourusername/bin/htk-3.4/bin.linux

64-bit Systems

Easiest way to do this is as follows (thanks to aaa in this thread):

# linux32 bash

↑ 32 bit terminal

#./configure --prefix=/home/yourname/htk

(may also need to: yum install libx11-devel)

#make all

#make install


Old approach:

After unpacking the sources, open a command line terminal and go to the /hom/yourusername/bin/htk3.4 directory where you downloaded your files. 

You now need to install 386 compatibility versions of some development libraries:

$su

#yum install glibc-devel.i386 libX11-devel.i386

configure 

The default location for binaries is "/usr/local" which will put the tools in "/usr/local/bin".  You need to change this default location using the "./configure" script to specify where you want the binaries installed:

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

This directs the make command to put all your binaries in the following folder:

  •  /home/yourusername/bin/htk-3.4/bin.linux

make 

To build the libraries and binaries, execute the following:

$make all

Running the following command will install them: 

$make install

Step 6 - Copy required HTK Perl Scripts

Create a new directory called "HTK_scripts" in your voxforge folder, it should have the following path:

  • /home/yourusename/voxforge/HTK_scripts 

Copy the following HTK scripts to your newly created 'HTK_scripts' folder:

  • mkclscript.prl (located in /htk-3.4/samples/RMHTK/perl_scripts folder)
  • maketrihed (located in /htk-3.4/samples/HTKTutorial folder)
  • prompts2mlf (located in /htk-3.4/samples/HTKTutorial folder)
  • prompts2wlist (located in /htk-3.4/samples/HTKTutorial folder)

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 Julius

click the following link: 

and save it to your '/home/yourusename/bin' directory.

(note: if you want to compile Julius from source, see this FAQ entry) 

Step 2 - Extract Julius 

Extract the file using:

  • Nautilus (right click the tar/gzipped file and click extract here)
  • use tar from the command line:
    • tar -xvzf julius-3.5.2.tar.gz

this should create a julius-3.5.2 directory in your bin folder.

Update User Path

To update your user path, you need to add the following directories your user path variable:

  • /home/yourusename/bin/htk-3.4/bin.linux;
  • /home/yourusename/bin/htk-3.4/lib.linux; and
  • /home/yourusename/bin/julius-3.5.2-multipath-linuxbin/bin.

To do this, edit your '.bash_profile' file in your home directory (in Fedora you need to show 'hidden files' in Nautilus - so you can display file names with a period in front of them). You do this by adding the listed paths, separated by a colon (":") to the end of the PATH variable as follows (all one line, no spaces):
 

# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/home/yourusename/bin/htk-3.4/bin.linux:
home/yourusename/bin/htk-3.4/lib.linux:
/home/yourusename/bin/julius-3.5.2-multipath-linuxbin/bin

Log out and log back in to make your path change effective.

Testing Your HTK/Julius Install

  • Type in "HVite -V" in a Command Console Window;
if your system lists all the options available to the hvite command, then HTK is installed properly.
  • Type in "julian" in a Command Console Window;
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

If you are using Linux (we will be using the Fedora for these tutorials) use the following command to download and install Audacity (as superuser):

$su
Password:
#yum install audacity 

Click here to download Audacity from its web site.

Comments

AddSearch

By helpNeeded - 3/6/2014 - 1 Replies Hi

Hi
By mobline1 - 2/21/2014 Just to Thank you it work propertly

By Moustafa Mahmoud - 1/26/2014 - 1 Replies $cd /HTK

By mervenilay - 1/23/2014 - 2 Replies I followed the steps to install Julian on Windows7 64-bit system. I tested it as shown but it doesn't work. When I type "julian" on Cygwin64 Terminal it doesn't return any result. How to solve this problem?

By Rambod Rahmani - 9/25/2013 - 1 Replies Hi,

By adrian - 9/24/2013 - 1 Replies i get this error. If anyone could help me i would be greatful.

By Corde - 8/29/2013 - 5 Replies First of all i got some problems i using ubuntu 12.04 lts version on wmvare.

By Gustavo - 8/3/2013 The tutorial was very helpful, thanks a lot!

By Rosco - 5/9/2013 Hi,

By tamir - 3/29/2013 - 1 Replies am trying to install cygwin using window 7 but i can't find any sites in the step pls....pls i need help

By Ndekezi - 3/22/2013 - 1 Replies Hey guys , I am installing cygwin but I do not found any site on the list. what should do?

By dunginria - 3/13/2013 - 3 Replies Could you please tell me how to fix this warning 2330?

By novice - 12/14/2012 - 1 Replies after I perform this

By Ali Akbar - 12/4/2012 thank you

By Ali Akbar - 12/2/2012 Thank you so much for guiding me.

By dzungtran32 - 10/23/2012 - 5 Replies Dear all

By stafford - 10/3/2012 Dear all,

By Wei - 9/30/2012

By arua - 8/18/2012 can i install HTK 3.4 on win 7 32 bit without using cygwin.

By Bhupaesh Ghai - 7/5/2012 - 1 Replies I am getting the follwoing at the end of execution of ./configure.

By Mohit - 6/2/2012 - 4 Replies when i run make all command i get following error

By kmaclean - 9/30/2007 - 3 Replies

By rahul - 4/27/2012 - 1 Replies when i am trying to install htk then after

By wmhrae - 9/23/2011 - 1 Replies First run your build script then grabe /tmp/htk/HLMTools/Makefile, on line 77 remove 8 spaces and hit tab, drop file in your build directory and remove and cat it in after configure problem solve ! see part of my build script

By navya - 8/31/2011 - 3 Replies i am adding

By bala - 8/29/2011 - 1 Replies HTK is now ready to be built. Type "make all" to build the HTK libraries and tools. Then "make install" to install them. The tools will be installed in /home/ravi/bin/htk/bin Build notes: Language Modelling tools will be built. HDecode will not be built. You can build it manually later by running 'make hdecode install-hdecode' ************************************************** ravi@ubuntu:~/bin/htk$ make all (cd HTKTools && make all) \ || case "" in *k*) fail=yes;; *) exit 1;; esac; make[1]: Entering directory `/home/ravi/bin/htk/HTKTools' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/ravi/bin/htk/HTKTools' (cd HLMTools && make all) \ || case "" in *k*) fail=yes;; *) exit 1;; esac; make[1]: Entering directory `/home/ravi/bin/htk/HLMTools' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/ravi/bin/htk/HLMTools'

By Nico-ARG - 8/8/2011 - 1 Replies Dear all,

By ner - 7/26/2011 - 1 Replies I have tried to run the demo to test the HTK by VoxFroge under Cygwin but when I run the follwoign command:

By regulator - 7/18/2011 - 19 Replies Hi!

By ossia - 7/4/2011 - 1 Replies Hi,