ExKaldi-RT is an online ASR toolkit for Python language. It reads realtime streaming audio and do online feature extraction, probability computation, and online decoding. It based on Kaldi's LatticeFasterDecoder.
ExKaldi-RT has these features:
-
Easy to build an online ASR pipeline with Python with low latency.
-
Use DNN acoustic model trained with DL framesworks, such as TensorFlow and PyTorch.
-
Easy to custimize original functions for, such as voice activity detection (VAD) and denoising.
-
Support network transmission.
We tested our toolkit using Kaldi version 5.5, commit acff3f65640715f22252f143df7c3e1997899163 .
-
Instead of subprocess in Python, use Pybind to build the interface with C++ library. (It is being gradually completed.)
-
Still use multiple threads to drive each components ( We have tried to use multiprocessing, but we have encountered some difficulties in data communication between different processes, and are considering solutions. )
-
Improve the Packet to carry more infomation.
-
It is able to connect components parallelly to perform multiple tasks.
If you plan to use ExKaldi-RT on the server, please make sure that Kaldi has been installed and compiled successfully before installing ExKaldi-RT. Then follow the steps below to install ExKaldi-RT package.
- Clone ExKaldi-RT repository.
git clone https://github.com/wangyu09/exkaldi-rt.git
- Copy these directories into Kaldi source folder.
cd exkaldi-rt
cp -r exkaldirtc $KALDI_ROOT/src/
cp -r exkaldirtcbin $KALDI_ROOT/src/
- Install Pybind11.
pip3 install pybind11
- Go to source directories and compile C++ source programs. If you have installed Pybind11, please ignore the compile error: "fatal error: pybind11/pybind11.h: No such file or directory"
export EXKALDIRTROOT=`pwd`
cd $KALDI_ROOT/src/exkaldirtc
make depend
make
cd $KALDI_ROOT/src/exkaldirtcbin
make -i depend
make
make pybind
- Go back to exkaldi-rt derectory and install ExKaldi-RT Python package.
cd $EXKALDIRTROOT
sudo apt-get install libjack-jackd2-dev portaudio19-dev libportaudio2
bash quick_install.sh
- Check.
python -c "import exkaldirt"