Skip to content

wangyu09/exkaldi-rt

Repository files navigation

ExKaldi-RT: An Online Speech Recognition Extension Toolkit of Kaldi

exkaldi-rt

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:

  1. Easy to build an online ASR pipeline with Python with low latency.

  2. Use DNN acoustic model trained with DL framesworks, such as TensorFlow and PyTorch.

  3. Easy to custimize original functions for, such as voice activity detection (VAD) and denoising.

  4. Support network transmission.

We tested our toolkit using Kaldi version 5.5, commit acff3f65640715f22252f143df7c3e1997899163 .

Version 1.2

  1. Instead of subprocess in Python, use Pybind to build the interface with C++ library. (It is being gradually completed.)

  2. 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. )

  3. Improve the Packet to carry more infomation.

  4. It is able to connect components parallelly to perform multiple tasks.

Installation

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.

  1. Clone ExKaldi-RT repository.
git clone https://github.com/wangyu09/exkaldi-rt.git
  1. Copy these directories into Kaldi source folder.
cd exkaldi-rt
cp -r exkaldirtc $KALDI_ROOT/src/
cp -r exkaldirtcbin $KALDI_ROOT/src/
  1. Install Pybind11.
pip3 install pybind11
  1. 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
  1. 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
  1. Check.
python -c "import exkaldirt"

About

An online speech recognition extension toolkit of Kaldi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published