1. Installation




1.1. Build from Source

Note

The easiest installation uses conda environments for Linux Installation or macOS Installation.

Another option is to use a pre-compiled virtual machine image: Virtual Machine Installation which has much of the required software already included. This option however takes up a large (~14GB) amount of disk space. This is the only supported installation options for Windows users.




1.1.1. Linux Installation

1.1.1.1. Downloading HTK

The HTK Toolkit is required to perform the backend acoustic modeling and alignment. Because of license requirements, HTK cannot be distributed with other software, but it is free to download for individual users.

First, register on the HTK website

Then, download the HTK source code. faseAlign was developed using the stable release 3.4.1 of HTK.

1.1.1.2. Compiling HTK

Once the zipped source code has been downloaded. Navigate to the downloaded file and execute the following command to unpack it:

tar -xvzf HTK-3.4.1.tar.gz

Now move into the newly created htk directory:

cd htk

Finally, execute the following lines of code to compile and install HTK:

export CPPFLAGS=-UPHNALG
./configure --disable-hlmtools --disable-hslab --without-x
make all
sudo make install

If your installation was successful, the following command should print out the version information for the HTK toolkit:

HVite -V

1.1.1.3. Making sure you have miniconda

We’ll be using conda to build an environment for faseAlign. Follow the instructions on the miniconda linux installation page and ensure that you’re following the instructions for Miniconda - Python 3.9.

1.1.2. Build the Conda env

We’ll be using conda to manage our python packages and prevent other version issues. For more details on conda usage, please consult the conda documentation.

To build the conda environment, we’ll need to download the environment.yml file, either manually or with the following command:

wget https://raw.githubusercontent.com/EricWilbanks/faseAlign/master/environment.yml

Next, we’ll build the environment with conda.

conda env create -f environment.yml

You should receive a success message along the lines of “Done. To activate this environment…”

1.1.3. Correctly Configure UTF-8

At this point you need to ensure that accented (UTF-8) characters are correctly interpreted. To do so, enter the following to the terminal:

echo export LC_ALL=en_US.UTF-8 >> ~/.bashrc
echo export LC_ALL=en_US.UTF-8 >> ~/.profile
echo export LANG=en_US.UTF-8 >> ~/.bashrc
echo export LANG=en_US.UTF-8 >> ~/.profile
echo export LANGUAGE=en_US.UTF-8 >> ~/.bashrc
echo export LANGUAGE=en_US.UTF-8 >> ~/.profile

source ~/.bashrc

1.1.4. Activating the fase environment

In order to use use faseAlign on the command line, we’ll now have to activate the conda environment we’ve just built. You have to activate this environment each time you restart the session, using the following code:

conda activate fase

You should now see a (fase) to the left of your command line, indicating that the environment is active. To deactivate the environment, use the following:

conda deactivate

For more details on conda environment usage, please consult the conda documentation.




1.1.5. macOS Installation

1.1.5.1. Xcode Compiler

First we have to make sure that Xcode (and included GCC compiler) are installed. Open the terminal application and call the following command:

xcode-select -p

If this command is not successful, install Xcode through the terminal:

xcode-select --install

And select “Install”

1.1.5.2. Homebrew Installation

Next, we need a package manager. Install Homebrew through the terminal:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

1.1.5.3. Downloading HTK

The HTK Toolkit is required to perform the backend acoustic modeling and alignment. Because of license requirements, HTK cannot be distributed with other software, but it is free to download for individual users.

First, register on the HTK website

Then, download the HTK source code. faseAlign was developed using the stable release 3.4.1 of HTK.

1.1.5.4. Compiling HTK

Once the zipped source code has been downloaded. Navigate to the downloaded file and execute the following command to unpack it:

tar -xvzf HTK-3.4.1.tar.gz

Now move into the newly created htk directory:

cd htk

Finally, execute the following lines of code to compile and install HTK:

export CPPFLAGS=-UPHNALG
./configure --disable-hlmtools --disable-hslab --without-x
make all
sudo make install

If your installation was successful, the following command should print out the version information for the HTK toolkit:

HVite -V

1.1.5.5. Making sure you have miniconda

We’ll be using conda to build an environment for faseAlign. Follow the instructions on the miniconda macOS installation page and ensure that you’re following the instructions for Miniconda - Python 3.9.

1.1.6. Build the Conda env

We’ll be using conda to manage our python packages and prevent other version issues. For more details on conda usage, please consult the conda documentation.

To build the conda environment, we’ll need to download the environment.yml file, either manually or with the following command:

wget https://raw.githubusercontent.com/EricWilbanks/faseAlign/master/environment.yml

Next, we’ll build the environment with conda.

conda env create -f environment.yml

You should receive a success message along the lines of “Done. To activate this environment…”

1.1.7. Correctly Configure UTF-8

At this point you need to ensure that accented (UTF-8) characters are correctly interpreted. To do so, enter the following to the terminal:

echo export LC_ALL=en_US.UTF-8 >> ~/.bashrc
echo export LC_ALL=en_US.UTF-8 >> ~/.profile
echo export LANG=en_US.UTF-8 >> ~/.bashrc
echo export LANG=en_US.UTF-8 >> ~/.profile
echo export LANGUAGE=en_US.UTF-8 >> ~/.bashrc
echo export LANGUAGE=en_US.UTF-8 >> ~/.profile

source ~/.bashrc

1.1.8. Activating the fase environment

In order to use use faseAlign on the command line, we’ll now have to activate the conda environment we’ve just built. You have to activate this environment each time you restart the session, using the following code:

conda activate fase

You should now see a (fase) to the left of your command line, indicating that the environment is active. To deactivate the environment, use the following:

conda deactivate

For more details on conda environment usage, please consult the conda documentation.




1.2. Virtual Machine Installation

1.2.1. Download BPM Image

Another way to run faseAlign on your own computer is to use a virtual machine image with the required software already included. The image we’ll be using is based on the Berkeley Phonetics Machine (BPM), in turn derived from the Berkeley Common Environment (BCE).

Download the faseAlign OVA image.

1.2.2. Set Up Virtual Machine

First, you’ll need to install VirtualBox in able to be able to run virtual machines on your computer.

Run VirtualBox and select File, Import Appliance… and select the .ova file you downloaded earlier. Then adjust the amount of RAM the virtual machine is allotted (defaults are typically fine).

You can now start the virtual machine by clicking the green “Show” arrow.

Warning

If you’re on a Windows computer and run into errors at this step, virtualization might be disabled on your computer.

Follow the BCE Guide to Enabling Virtualization in order to enable virtualization. This involves editing BIOS settings, so if you don’t feel comfortable making such changes consult with someone who does.

Note

The files on your virtual machine and the files on your host machine are completely separated and do not interact.

If you want to transfer files between the two you need to set up a Shared Folder.

  • Create a folder on your main computer wherever you like
  • Open up the VirtualBox application and select the virtual machine you want to add the folder to and go to Settings
  • Go to the Shared Folders tab and click the Adds new Shared Folder button.
  • Select the Folder you want to share and make sure you select Auto-Mount
  • The next time you start up the virtual machine you should find the shared folder at /media/sf_myfoldername/ or ~/Desktop/Shared/sf_myfoldername

1.2.3. Install HTK

The HTK Toolkit is required to perform the backend acoustic modeling and alignment. Because of license requirements, HTK cannot be distributed with other software, but it is free to download for individual users.

First, register on the HTK website.

Next, open the terminal application and install/download HTK with the following code:

sudo bpm-update htk

You will be prompted for the username and password from your HTK registration.

1.2.4. Build the Conda env

We’ll be using conda to manage our python packages and prevent other version issues. For more details on conda usage, please consult the conda documentation.

To build the conda environment, we’ll need to download the environment.yml file, either manually or with the following command:

wget https://raw.githubusercontent.com/EricWilbanks/faseAlign/master/environment.yml

Next, we’ll build the environment with conda.

conda env create -f environment.yml

You should receive a success message along the lines of “Done. To activate this environment…”

1.2.5. Correctly Configure UTF-8

At this point you need to ensure that accented (UTF-8) characters are correctly interpreted. To do so, enter the following to the terminal:

echo export LC_ALL=en_US.UTF-8 >> ~/.bashrc
echo export LC_ALL=en_US.UTF-8 >> ~/.profile
echo export LANG=en_US.UTF-8 >> ~/.bashrc
echo export LANG=en_US.UTF-8 >> ~/.profile
echo export LANGUAGE=en_US.UTF-8 >> ~/.bashrc
echo export LANGUAGE=en_US.UTF-8 >> ~/.profile

source ~/.bashrc

1.2.6. Activating the fase environment

In order to use use faseAlign on the command line, we’ll now have to activate the conda environment we’ve just built. You have to activate this environment each time you restart the session, using the following code:

conda activate fase

You should now see a (fase) to the left of your command line, indicating that the environment is active. To deactivate the environment, use the following:

conda deactivate

For more details on conda environment usage, please consult the conda documentation.




1.2.7. Windows Installation

Not supported. Please use the Virtual Machine Installation.