HTK Speech Recognition Toolkit
 [ Home | Register | Mailing Lists | Documentation ]
Home

Getting HTK
Register
Manage login/password
Download

Documentation
HTKBook
FAQ
History of HTK
CUED LVR Systems
License

Mailing Lists
Subscribe
Account/Unsubscribe
Archives

Development
Get involved
Future Plans
Report a Bug
Bug Status
ATK   

Links
HTK Extensions
ASR Toolkits/Software
ASR Research Sites
Speech Companies
Speech Conferences
Speech Journals
ASR Evaluations



Sponsors

Installing HTK on Linux or Unix

Please note that from version 3.3, HTK uses Autoconf to facilitate the installation process.

If you have a particular reason to install an older version of HTK (3.2.1 or earlier), please refer to this document.

Prerequisites

  • A C compiler. All Linux distributions suitable for developers will have a copy of gcc installed, but you can use other compilers such as the Intel compiler icc. If in doubt, please ask your system administrator.
  • For testing, you will require a Perl Interpreter. Most modern Linux/Unix systems include one by default.
  • You will need either tar and gzip (if you download the sources via ftp or http) or CVS (if you download from our CVS server). These tools are usually included by default with Linux distributions. Many other modern UNIX variants also supply them, as optional packages if not by default.
  • If compiling on Apple Macintosh OS X, you must have the XCode and XOrg-devel products installed. These are available for no cost from the Apple Developer Connection. Registration with Apple is required.
  • Register on this site by accepting the HTK End User Licence Agreement, then download the latest HTK source code.
  • Some experience of working with one of the Unix shells (e.g. bash, csh, tcsh). You will need to know which shell you are using, if unsure type:
    > echo $SHELL
  • You will also need to know how to edit files and how to set environment variables.

If you require assistance...

If you are unfamiliar with installing software from source on Linux or Unix, you may resolve any queries more quickly and reliably if you ask a knowledgeable colleague or your local technical support for assistance in the first instance.

If that option is unavailable to you, please try the following sources of assistance:

  1. Search the archives of the htk-users mailing list
  2. If you don't find what you're looking for in the search, subscribe to the htk-users list and post your question there.

Compilation and installation

After unpacking the sources, cd to the htk-3.3 directory. Decide where you wish the binaries to be installed (default is /usr/local which will put the tools in /usr/local/bin.linux) then type ./configure --prefix=/path/to/your/installation

Then running make all will build and install HTK.

<

Installation example

This example shows an installation of HTK on a linux workstation. User entered commands are shown in bold.

> tar xzf HTK-3.3.tar.gz > cd htk > ./configure --prefix=/tmp checking for gawk... gawk checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes [*** multiple lines deleted ***] checking for strtol... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu configure: creating ./config.status config.status: creating HTKLib/Makefile config.status: creating HTKTools/Makefile config.status: creating HLMLib/Makefile config.status: creating HLMTools/Makefile config.status: creating Makefile > make all make[1]: Entering directory `/home/cabinet1/jal58/htk/release-3.3/htk/HTKLib' gcc -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="linux"' -Wall -Wno-switch -g -O2 -I. -c -o HShell.o HShell.c gcc -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="linux"' -Wall -Wno-switch -g -O2 -I. -c -o HMath.o HMath.c [*** multiple lines deleted ***] for program in Cluster HLMCopy LAdapt LBuild LFoF LGCopy LGList LGPrep LLink LMerge LNewMap LNorm LPlex LSubset ; do /usr/bin/install -c -m 755 ${program} /tmp/bin.linux ; done make[1]: Leaving directory `/home/cabinet1/jal58/htk/release-3.3/htk/HLMTools' > ls /tmp/bin.linux Cluster HDistance HLEd HParse HSLab LFoF LMerge HBuild HDMan HList HQuant HSmooth LGCopy LNewMap HCluster HERest HLMCopy HRest HVite LGList LNorm HCompV HHEd HLRescore HResults LAdapt LGPrep LPlex HCopy HInit HLStats HSGen LBuild LLink LSubset >

Testing

Among the samples on the HTK website you'll find the HTK-samples package that can be used to test your installation.

As an initial test of the installation please run the HTK demonstration using the configuration file HTKDemo/configs/monPlainM1S1.dcf. There is a README file in the HTKDemo directory explaining the operation of the demonstration in detail but, in short, you need to run the demonstration script passing it the configuration file configs/monPlainM1S1.dcf as input. To test the language modelling tools you should follow the tutorial in the HTK book, using the files in the LMTutorial/ directory.

Before running the demo make sure you have compiled all the HTK tools and the executables are in your PATH, i.e. just typing 'HInit' at the commandline prints a short usage summary. To run the demonstration type:

cd HTKDemo
perl runDemo.pl configs/monPlainM1S1.dcf

The recognition results obtained should match the following.

On the training set:

------------------------ Overall Results -------------------------- SENT: %Correct=0.00 [H=0, S=7, N=7] WORD: %Corr=77.63, Acc=74.89 [H=170, D=37, S=12, I=6, N=219] ===================================================================

On the test set:

------------------------ Overall Results -------------------------- SENT: %Correct=0.00 [H=0, S=3, N=3] WORD: %Corr=63.91, Acc=59.40 [H=85, D=35, S=13, I=6, N=133] ===================================================================

Comments and suggestions to htk-mgr@eng.cam.ac.uk