OpenDcd - An Open Source WFST based Speech Recognition Decoder
OpenDcd a lightweight and portable WFST based speech decoding toolkit written in C++. OpenDcd provides a set of tools for decoding, cascade construction and hypothesis post- processing. The focus of the toolkit is to provide a foundation for research into new decoding methods that can be deployed. Through the use of C++ templates the core decoder can be configured and extended in many ways. For example selecting different on-the-fly composition or lattice generation strategies. The core engine has detailed profiling, logging and analysis methods that make it highly for deployement in production systems. The toolkit makes used of OpenFst for representing and manipulating the models. It is distributed as an open source project with an Apache Licence.
For more information see the main documentation site, and the tutorial for installing the OpenDcd and decoding using the Librispeech corpus and models from kaldi-asr.og.
Quick Installation Guide
git clone https://github.com/opendcd/opendcd.git
cd src/bin make
Kaldi Conversion Quick Start
For Kaldi model converion and decoding a working Kaldi installation and set of acoustic and language models and features from generated from a Kaldi egs/s5 script are required. The following example is based on the output of Kaldi WSJ training run.
Graph construction, the scripts directory contains The Kaldi language directory, we re-use the existing Kaldi lexicon and LM.
cd $OPENDCD/scripts export KALDI_ROOT=/home/opendcd/tools/kaldi-trunk ./makeclevel.sh \ $KALDI_ROOT/egs/wsj/s5/data/lang_test_bg_5k \ $KALDI_ROOT/egs/wsj/s5/exp/tri2a \ $KALDI_ROOT/egs/wsj/s5/exp/ocd_tri2a \ $KALDI_ROOT
See egs directory contains example script for showing how to convert a Kaldi WSJ setup
The first release includes the following features:
- Standalone lightweight decoder core
- Kaldi file format compatible or ptionally build against Kaldi
- Post-processing tools
- OpenFst and Kaldi Interop Tools
- Customizable transition model for custom user and transition models
- Direct decoding on different weight semiring
- On-the-fly decoding using lookahead composition
- Lattice generation
- Switchable STL implementations. Use different implementations such EASTL or RDESTL, or mix optimized containers such as Google sparse hash.
- Powerful registration mechanism for adding user defined acoustic models and or lattice generation strategies
- Script to efficiently build and convert models from a Kaldi lang directory
farfilterApply the command to every in FST in the FAR archive
latticetofarConvert Kaldi Table to OpenFst FAR archive
fartolatticeConvert an OpenFst FAR archive to Kaldi Table
- Write results in Kaldi Lattice table format
- More information on optionally building against Kaldi
- Convert Kaldi tree to optimized decoding structure