Some notes on Kaldi

Installing Kaldi

Building Kaldi

Follow the official instructions

Do not forget to first cd to /kaldi-trunk/tools then do a make -j 8 to build to tools kaldi usesi.


  • Issue: Requires libtool - Resolution: Build and install libtool, I did so by installing from source locally (via configure –prefix)
    • Resolution (alternative): Install with package manage (apt-get)
  • then try and build kaldi, first running .configure
    • Issue: Needs a BLAS.
      • Resolution: use OpenBlas
        • go back to /kaldi-trunk/tools and make -j 8 openblas
        • use it by running ./configure --openblas-root=../tools/OpenBLAS/install
    • Issue: this Kaldi won’t run with GCC 4.8.4
      • Resolution: install newer GCC from source
        • Follow instructions from GCC website
          • in particular for getting the dependencies
        • When it comes to running configure use: ../gcc-4.9.2/configure --disable-multilib
        • when doing use make -j 8 or it will take a very long time to build
      • Resolution (alternative) : install from backports

Installing Graph Viewer

For viewing the output of fstdraw, you need to convert it into a useful format. To do this you need dot which is part of graphviz. apt-get install graphvis

Adding things to your path

Since Kaldi has not been install to any location – just built in place. Nothing is on your path.

The build process, spreads out all the binaries into a number of folders in \kaldi-trunk\src/*bin, intermixing them with the source files. (so you can’t just add the bin files to your path).

You might like to symlink all executables into one folder and add it to your path. The symlinking can be done with the following shell script:

for a in  `find . -type f -executable -print`;
ln -s `pwd`/$a bins

This will put them all into the bins directory. Then you can edit your .bashrc file to add that to your path. e.g.: