Hidden Markov Model Toolkit Java Interface (HTKJI)

The HTK Java Interface (HTKJI) provides functions for calling Hidden Markov Model Toolkit (HTK) tools in Java. Furthermore, it provides functions for recognition tasks which are easy to use. The key features of HTKJI are:

  • A small and lightweight library
  • A very simple API
  • Discrete models, semi-continous models and continous models
  • Model tying
  • Parameter smoothing
  • ...

What is HTK?

HTK is a portable toolkit for building and manipulating Hidden Markov Models (HMM). It was developed at the Cambridge University and is primarily designed for speech recognition tasks. However, HTK can be used also for other applications like gesture recognition, character recognition or DNA sequencing.

Introduction

Model training:

Logger log = new Logger(2); // initialise a new Logger instance with log level 2
Options opt = new Options("/foobar/my_workspace"); // initialise a new Options instance with an absolute path to the workspace 

HTKTrainer htk = HTKTrainer(log, opt); // initialise trainier
htk.train(); // train all files listed in the training script file defined in Options 

or

htk.train(tc); // train models with training instance

Classification:

Logger log = new Logger(2); // initialise a new Logger instance with log level 2
Options opt = new Options("/foobar/my_workspace"); // initialise a new Options instance with an absolute path to the workspace

HTKClassifier htk = new HTKClassifier(log, opt);
Result res = htk.classify(); // classify all files listed in the classify script file defined in Options

or

Result res = htk.classify(inst); // classify data in instance

HTK script file format:

In a HTK script file are all training files listed, in every line one file name. The script file might look like:

/foobar/workspace/tdata/circle_3.htk
/foobar/workspace/tdata/circle_6.htk
/foobar/workspace/tdata/left_10.htk
/foobar/workspace/tdata/circle_1.htk
...

Data file name format:

The data file name format must follow this schema: name_id.htk

Data file format:

The data files using the HTK parameter file format. HTKJI provides a function for creating one.

HTKJI Download

The application is published under the terms of the GPLv3 licence.

HTKJI.jar


Note: HTKJI is distributed without HTK sources or binaries. It must be downloaded separately from the HTK web site.

Contact Information

Feel free to send us your questions at mathias.wilhelm@dai-labor.de.