MFA

The MFA annotator integrates with the Montreal Forced Aligner, which can use words with phonemic transcriptions, and the corresponding audio, to force-align words and phones; i.e. determine the start and end time of each speech sound within each word, and thus the start/end times of the words.

The annotator can work in two modes:

  1. Train and Align - acoustic models are trained on the data you want to align, which can be in any language as long as you have a pronunciation dictionary for it.
  2. Pre-trained Models/Dictionaries - pre-trained models and pronunciation dictionaries are supplied by the Montreal Forced Aligner and used for forced alignment. A list of languages for which dictionaries are available is here.

The Montreal Forced Aligner is a third-party tool developed by Michael McAuliffe and others for time aligning orthographic and phonological forms from a pronunciation dictionary to orthographically transcribed audio files. It is open source software based on the Kaldi ASR toolkit.

Install the Montreal Forced Aligner first

This annotator cannot install the Montreal Forced Aligner. Under most circumstances you must manually install it in a location that is accessible to your annotation server user.

(The only exception to this is if your server is running in a Docker container, in which case, it's possible that your system has sufficient privileges to install MFA for itself. In this case, you can click the Attempt to Install MFA button when you install this annotator.)

Up-to-date installation instructions for the Montreal Forced Aligner are available here:
https://montreal-forced-aligner.readthedocs.io/en/latest/installation.html

Linux

To install the Montreal Forced Aligner on Linux systems for all users, so that your web server can access it if required:

  1. Download Miniconda:
    wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh
  2. Start the installer:
    sudo bash Miniconda3-py38_4.10.3-Linux-x86_64.sh
  3. When asked the location to install Miniconda, use:
    /opt/conda
  4. When asked whether the installer should initialize Miniconda, this is unnecessary so you can respond no
  5. Change ownership of the conda files):
    sudo chown -R $USERNAME:$USERNAME /opt/conda
  6. Make conda accessible to all users (so you web server can access MFA):
    chmod -R go-w /opt/conda
    chmod -R go+rX /opt/conda
  7. Install the Montreal Forced Aligner
    /opt/conda/bin/conda create -n aligner -c conda-forge montreal-forced-aligner

Windows

To install the Montreal Forced Aligner on Windows systems for all users, so that your web server can access it if required:

  1. Download the Miniconda installer.
  2. Start the installer by double-clicking it.
  3. When asked, select the Install for all users option. This will install conda somewhere like
    C:\ProgramData\Miniconda3
  4. When asked, tick the add to PATH option.
  5. Install the Montreal Forced Aligner by specifying a path to the environment
    conda create -c conda-forge -p C:\ProgramData\Miniconda3\envs\aligner montreal-forced-aligner

Upgrading Montreal Forced Aligner

If the Montreal Forced Aligner is already installed an in use with the MFA Annotator, but you want to upgrade to its latest version, you can use the same command as for installing it, but use update instead of create - i.e.

On Linux:
/opt/conda/bin/conda update -n aligner -c conda-forge montreal-forced-aligner

On Windows:
conda update -c conda-forge -p C:\ProgramData\Miniconda3\envs\aligner montreal-forced-aligner