- A C++ compiler with good C++ 11 support (e.g. g++ >= 4.8)
- cmake — version 3.5.1 or later, make
- flashlight is required. flashlight must be built with distributed training enabled.
- libsndfile is required for loading
audio. If using wav2letter++ with
flac
files,libsndfile
must be built withOgg
,Vorbis
andFLAC
libraries. - Intel's Math Kernel Library is required for featurization.
- FFTW is required for featurization.
- KenLM is required for the decoder. One of LZMA, BZip2, or Z is required for LM compression with KenLM.
- glags is required.
- glog is required.
- Google Test >= 1.8.0 is required if building tests.
flashlight
requires CUDA >= 9.2; if building wav2letter++ with theCUDA
criterion backend, CUDA >= 9.2 is required. Using CUDA 9.2 is recommended.- If building with the
CPU
criteiron backend, wav2letter++ will try to compile with OpenMP, for better performance.
Options | Configuration | Default Value |
---|---|---|
CRITERION_BACKEND | CUDA, CPU | CUDA |
BUILD_TESTS | ON, OFF | ON |
CMAKE_BUILD_TYPE | CMake build types | Debug |
First, clone the repository:
git clone --recursive https://github.com/facebookresearch/wav2letter.git
and follow the build instructions for your specific OS.
There is no install
procedure currently supported for wav2letter++. Building
produces three binaries in the build
directory:
Train
: given a dataset of input audio and corresponding transcriptions in sub-word units (graphemes, phonemes, etc), trains the acoustic model.Test
: performs inference on a given dataset with an acoustic model.Decode
: given an acoustic model/pre-computed network emissions and a language model, computes the most likely sequence of words for a given dataset.
wav2letter++ has been tested on Ubuntu 16.04 and CentOS 7.5.
Building on Linux is simple. Once you've downloaded wav2letter++ and built and installed the required dependencies:
# in your wav2letter++ directory
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCRITERION_BACKEND=[backend]
make -j4 # (or any number of threads)