installing the aligner

Installing the prosodylab aligner on a Mac (10.5 and higher):

Important Note: If you try this, please be aware that you’re doing so at your own risk, and we cannot provide support. We just describe what seems to have worked for us in the hope that it’ll help you. If you run into problems, you can send us an email at, but we can’t guarantee that we will respond soon or that we can help you. If you have suggestions how to improve this page, please let us know!

Prerequisite: You need to have XCode (the apple developer tools) installed. You can download XCode 3 for free here. You’ll need to sign up for an account first—you should not have to pay anything to get XCode or the account.

Step A: Installing HTK
Step B: Installing SoX
Step C: Installing the prosodylab aligner

A. Installing HTK on a Mac:

HTK is currently at version 3.4.1. However, if you’re also intending to use the UPenn aligner, you must use HTK 3.4 instead. Below, I detail the steps necessary to complete this. (If you’re unable to deal with this, HTK 3.4.1 may still work for you.)

Commands to be issued in Terminal are indicated with a leading “$” character: e.g., “$ echo” means “type ‘echo’ in Terminal, then hit the Return key”.

1. To install HTK, you will need to install the apple developer tools first (you need this in order to be able to run commands like ‘make install’ etc.). Just install the most recent version that is free, which you’ll find here.

2. Obtain an HTK username and password here.

3. No link to the HTK 3.4 source is provided on the HTK website. However, it is still available here. *Do not use the default link, which would give you a more recent version*. You will be prompted for the HTK username and password that you provided in the previous step. Enter them, and the download will begin.

4. By default, the file you will download is named “HTK-3.4.tar.gz”. In Terminal, navigate to the folder where this file is. This file needs to be decompressed, which can be done by issuing the following command:

$ tar -xvzf HTK-3.4.tar.gz

This will create a folder named “htk”. Alternatively, if you double-click on the file “HTK-3.4.tar.gz” in Finder, Mac OS X will create a the “htk” folder.

5. Navigate to this folder by typing the following in the Terminal:

$ cd htk

6. Issue the following command in Terminal:

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

A lot of output will be generated; ignore it unless there is an error message. Then issue the following command (if you copy and paste this command, make sure that take out any line breaks that you might inadvertently copy along):

$ make all CFLAGS=-DARCH=’\”darwin\”‘” -I/usr/include/malloc -I$PWD/HTKLib -I$PWD/HLMLib -I. -I.. -L/usr/X11/lib”

Once again, this will generate a lot of output which should be ignored unless you see an error message.

7. Lastly, you issue the command given below. This will prompt for
your computer password:

$ sudo make install

8. To test that the installation was successful, you can issue the following command:

$ HCopy -V

This should print out the version number for all the HTK files: all should be version 3.4.

Step B. Installing SoX

SoX is a popular open-source command-line tool for sound manipulation of virtually any type. Unfortunately, SoX does not compile out of the box on Mac OS X, so it is preferable to download a compiled version and install it and the appropriate libraries. Commands to be issued in Terminal are indicated with a leading “$”character: e.g., “$ echo” means “type ‘echo’ in Terminal, then hit the Return key”.

1. A compiled version of SoX can be found at the following URL here.

Near the top of this page you’ll see a link that reads:

“Looking for the latest version? Download sox-…”

(where “…” abbreviates the current version number). This will be the
newest version. Click on the link and downloading will begin.

2. Navigate to the folder containing the downloaded file in Terminal.

3. To decompress the zip file, issue the following command in Terminal (fixing the version number to be appropriate for the version you downloaded, if necessary):

$ unzip

Alternatively, if you double-click on the downloaded file in Finder, Mac OS X will create the folder.

4. Navigate to the folder you just created (once again fixing the version number if necessary):

$ cd sox-14.3.2

5. To install SoX, issue the command given below. This will prompt for computer password.

$ sudo mv sox play soxi rec /usr/local/bin/

6. Type the following in Terminal to confirm that SoX has been installed:

$ sox –version

You should see something like:

sox: SoX v14.3.2

* SoX is useful for up- or down-sampling, and supposedly its “polyphase” method produces better output than Praat (which uses sinc interpolation: see here. for an explanation of the differences, in MATLAB).
* An alternative way to do this installation is with MacPorts ( A command to resample things to be 16 kHz (for the Penn aligner).


Step C. Installing the prosodylab aligner:

C. Download the aligner, run the command to dowload the dictionary as detailed in the README file, now it should be working.