Prosodylab-Aligner Tutorial, LSA Meeting 2015, Portland, Oregon

Send comments, questions and suggestions to Michael Wagner and Kyle Gorman.

Installations instructions for Mac Users

NB: when you are instructed to type in a command, do not type the '$' symbol; it just indicates the start of the prompt.

NB: most of these commands will produce significant text output. You can safely ignore it unless it explicitly is marked as an 'error'.

Install XCode

XCode is a free application that contains of all the tools you need to compile most software on Mac OS X. You can get it from the Mac App Store) or you can start the download from the Terminal. To do the latter, launch the application '', then type the following at the prompt, then hit return:

    $ xcode-select --install

Note that this is a large download and will take a while. Start it now! An alternative option that is somewhat smaller is Command Line Tools for Xcode.

Install HTK (Hidden Markov ToolKit)

HTK is the "backend" that powers the aligner. It is available only as uncompiled code. First, go to the HTK website and register. Then click on 'Download' on the left panel, and then click on 'HTK source code (tar+gzip archive)' under 'Linux/Unix downloads'.

Once this is downloaded, you may have to unpack the "tarball". Launch the application '' (if you haven't already), and then navigate to your downloads directory (cd ~/Downloads will probably work). Then unpack the tarball like so:

    $ tar -xvzf HTK-3.4.1.tar.gz

Some browsers automatically unpack compressed files that they download. If you get an error when you execute the above command, try the following instead:

    $ tar -xvf HTK-3.4.1.tar

Once you extract the application, navigate into the resulting directory:

    $ cd htk

Once this is complete, the next step is to compile HTK. Execute the following commands inside the htk directory:

    $ export CPPFLAGS=-UPHNALG
    $ ./configure --disable-hlmtools --disable-hslab
    $ make -j4 all
    $ sudo make -j4 install

(This will take a few minutes.)

At the last step, you may be asked to provide your system password; do so and then hit return. Note that your password will not echo (i.e., no '*' will be produced when you type).

Install Homebrew

Homebrew is a command-line application for installing software on your Macintosh. It is the easiest way to get the remaining dependencies to run the aligner. To install Homebrew, launch the application '' (if you haven't already) and type the following:

    $ ruby -e "$(curl -fsSL"

and then follow along with the instructions that are displayed in the terminal window. Once again, you may need to enter your system password, and once again, your password will not echo.

Install Python 3

Homebrew makes it easy to install the newest version of Python programming language that powers the aligner. To install it, launch the application '' (if you haven't already) and type the following:

    $ brew install python3

(This will take a few minutes.)

Install SoX

SoX is the "Swiss Army knife of sound processing programs", and can be used to do fast batch of your audio files (though it is possible to run the aligner without using SoX). Once again, Homebrew makes it easy to install SoX. Launch the application '' (if you haven't already) and type the following:

    $ brew install sox

(This may take a few minutes.)

Install the actual aligner

Prosodylab-Aligner lives on GitHub, a repository for open-source software. You may want to create an account there, and perhaps install '', which makes it easier to interact with GitHub. But for the purposes of installing the aligner, all you need is the git command-line tool, which is part of Xcode (and so should already be installed). Launch the application '' (if you haven't already) and type the following:

$ git clone

Finally, you need to install a few additional dependencies for Python. Enter the following commands to take care of this:

$ cd Prosodylab-Aligner 
$ pip3 install -r requirements.txt

At this point, you can test your installation by running:

$ python3 -m aligner --help

which should print out some information about how to use the aligner. Good luck!