█

AI/TLDR

Buy me a coffee
Buy me a coffee

wav2letter++

Facebook AI Research's C++ speech recognition toolkit, kept as research recipes and pre-trained models

Audio, Music & VoiceOpen source
Latest
v0.2
Updated
28 Dec 2020
Language
C++
License
BSD

What's new

v0.228 Dec 2020

Final pre-consolidation release of wav2letter, built against Flashlight v0.2; later development continues in Flashlight's ASR application.

IN SHORT

What is wav2letter++?

wav2letter++ is the automatic speech recognition (ASR) toolkit from Facebook AI Research, written in C++ and described in the arXiv paper "wav2letter++: The Fastest Open-source Speech Recognition System" (arXiv:1812.07625). It sits in the Audio, Music & Voice category of the Multimodal Generation tools and is open-source, written in C++ and licensed BSD.

Updated Markdown version ↗

Overview

wav2letter++ is the automatic speech recognition (ASR) toolkit from Facebook AI Research, written in C++ and described in the arXiv paper "wav2letter++: The Fastest Open-source Speech Recognition System" (arXiv:1812.07625). It trains end-to-end acoustic models that turn audio straight into letters or word pieces, then decodes them with a beam search and an optional language model.

The project has a clearly stated status: its README says wav2letter was moved and consolidated into Flashlight, as Flashlight's ASR application, and that future wav2letter development happens there. The pre-consolidation code is preserved as the v0.2 release (December 2020), which builds against Flashlight v0.2, and the original Lua version lives on the wav2letter-lua branch.

What the repository still offers is its research recipes: training, decoding and data-preparation setups plus pre-trained models for FAIR speech papers, including streaming ConvNets, the 2019 end-to-end ASR architecture study, self-training, lexicon-free recognition, sequence-to-sequence models with time-depth separable convolutions and the original Wav2Letter ConvNet. The README asks that exact reproduction of those results use Flashlight 0.3.2 or earlier.

What it does

  • Recipes with pre-trained models that reproduce FAIR ASR papers, from the original Wav2Letter ConvNet to streaming ConvNets and semi-supervised self-training
  • Data-preparation scripts for common speech corpora, including LibriSpeech, WSJ, TIMIT, AMI and Multilingual LibriSpeech (MLS)
  • Acoustic-model setups covering ResNet, TDS and Transformer architectures trained with CTC or Seq2Seq criteria, as studied in the sota/2019 recipe
  • A streaming model with 500 ms of future context, trained on 1k hours of LibriSpeech plus 57k hours of unlabelled LibriVox audio
  • Word-piece and word-level language-model recipes (n-gram, ConvLM, Transformer) for beam-search decoding and rescoring
  • Built with CMake on top of Flashlight and ArrayFire; the older wav2letter-lua implementation is kept on its own branch

Getting started

The repository builds its recipes on top of Flashlight. Per the README, Flashlight must be installed from its 0.3 branch with the ASR application; to build the pre-consolidation toolkit itself, check out the wav2letter v0.2 release, which pairs with Flashlight v0.2.

Install Flashlight with the ASR app

Install Flashlight from its 0.3 branch (https://github.com/flashlight/flashlight/tree/0.3) with the ASR application enabled, following Flashlight's own build instructions.

Clone the repository

bashbash
git clone https://github.com/flashlight/wav2letter.git
cd wav2letter

Build the recipes

If Flashlight or ArrayFire were installed under a custom CMAKE_INSTALL_PREFIX, add -Dflashlight_DIR=[PREFIX]/usr/share/flashlight/cmake/ -DArrayFire_DIR=[PREFIX]/usr/share/ArrayFire/cmake to the cmake call.

bashbash
mkdir build && cd build
cmake .. && make -j8

Prepare a dataset

Each corpus under data/ has its own preparation script. For LibriSpeech, run this from data/librispeech, replacing [...] with the directory where audio and text should be stored.

bashbash
python3 prepare.py --dst [...]

Follow a paper recipe

Pick a directory under recipes/ (for example streaming_convnets or sota/2019). Each one documents its dependencies, flags files, pre-trained models and the training and decoding steps for that paper.

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reproducing or benchmarking against FAIR's published speech recognition results on LibriSpeech and related corpora
  • Starting from a pre-trained ConvNet, TDS or Transformer acoustic model instead of training an ASR system from scratch
  • Studying how streaming, lexicon-free or semi-supervised ASR recipes are set up before moving to Flashlight's ASR application
  • Maintaining an existing wav2letter v0.2 deployment that predates the consolidation into Flashlight

Version history

Every verified update to wav2letter++ that AI/TLDR tracked, newest first — each links to our coverage and the official changeset.

  1. 2020-12-28v0.2

    Final pre-consolidation release of wav2letter, built against Flashlight v0.2; later development continues in Flashlight's ASR application.

  2. 2018-12-21v0.1

    Initial release of the wav2letter++ C++ speech recognition toolkit.

How wav2letter++ compares

wav2letter++ alongside other open-source audio, music & voice tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
VoiceStudio★ 121kA local-first desktop voice studio that clones and designs voices, dubs video, and handles dictation, running 16 text-to-speech and 11 speech-recognition engines on your own hardware.
Whisper★ 114kOpenAI's speech recognition model that transcribes and translates audio across many languages.
GPT-SoVITS★ 64.3kAn open-source WebUI that clones a voice from a short audio sample and turns text into speech, with zero-shot and few-shot fine-tuning.
Voicebox★ 61.6kLocal-first voice studio that clones a voice from a short sample, generates speech across seven TTS engines and 23 languages, handles system-wide dictation, and speaks for agents over MCP.
VibeVoice★ 57.6kMicrosoft's text-to-speech model for generating long, expressive multi-speaker audio like podcasts.
whisper.cpp★ 55.7kA dependency-free C/C++ port of Whisper built on ggml, running speech recognition on CPU, Metal, CUDA, Vulkan and NPUs from phones to servers.
Coqui TTS★ 46.3kA library of text-to-speech models including the multilingual XTTS voice-cloning model.
wav2letter++★ 6.4kFacebook AI Research's C++ speech recognition toolkit, kept as research recipes and pre-trained models