Archive for January, 2010

Compiling HTK for Mac OS X Snow Leopard

Mac OS Xon January 22nd, 2010Comments Off

The Hidden Markov Model Toolkit (HTK) is widely used in speech recognition research. Since I’ll be doing some multimodal speech recognition soon, I downloaded the HTK and tried to compile it for Snow Leopard. This didn’t work right away, and after scraping the bowels of the internet for help, I’ve finally managed to get it working.

Use the following option to configure the Makefile:

./configure – -build=i686-apple-macos

No space between the dashes in case you are copying and pasting this. And for one of my machines I had to add an option to the CFLAGS in the Makefile. Open the makefile with your favorite text editor and add the following to CFLAGS:

-I/usr/include/malloc

That’s an ‘I’ as in ‘eye’.

Also, don’t follow the instructions in the README for testing the installation. Instead, perform the following commands as found on the official HTK site for testing a Mac OS/Linux install.

cd HTKDemo
mkdir -p hmms/{tmp,hmm.{0,1,2,3}} proto acc test
perl runDemo configs/monPlainM1S1.dcf