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


Search

Sponsors

Installing HTK on Linux or Unix

Please note that this page does not refer to the current version of HTK. Unless you have a particular reason to install an older version of HTK (3.2.1 or earlier), please refer to the instructions for installing current versions of HTK.

Prerequisites

  • 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.
  • 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

HTK consists of two libraries (built from the source code in HTKLib/ and HLMLib/) and a set of command line tools (in HTKTools/ and HLMTools/).

The supplied makefiles require the following environment variables to be set:

CPU current CPU type
HBIN specifies location of executables $HBIN/bin.$CPU
HTKCC Name of C compiler
HTKCF C compiler options
HTKLF Linker options

See the makefiles in HTKLib/, HTKTools/, HLMLib/ and HLMTools/ for detailed information about how these are used. The directory env/ contains example settings of these variables for a range of Operating Systems.

First build the library in HTKLib/ and then build the tools in HTKTools/. The executables will be copied to the directory $HBIN/bin.$CPU which should be added to your PATH. Then you can build the library in HLMLib/ and the tools in HLMTools/. The executables will again be copied to the directory $HBIN/bin.$CPU which should be added to your PATH.

Testing

Among the samples on the HTK website you'll find the HTKDemo 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