User Tools

Site Tools


alex_asr

Alex ASR

Url: https://github.com/UFAL-DSG/alex-asr The Alex ASR software package basically is an incremental speech decoder using the Kaldi ASR toolkit. It can be used for various types of GMM-HMM acoustic models and nnet2 ones.

After having done a clone of its Git repository, you can compile it as described on the github page or if you'd like to compile it with NVIDIA CUDA GPU support (to also support acoustic models trained using GPUs), do the following:

  1. Open <repo-dir>/prepare_env.sh and change the line ./configure –shared' to './configure –shared –use-cuda=yes under the section Configure Kaldi
  2. Open <repo-dir>/Makefile and add the following lines at the top:

CUDATKDIR = <add local path to CUDA dir here, usually /usr/local/cuda> CUDA_INCLUDE= -I$(CUDATKDIR)/include CUDA_LDFLAGS = -L$(CUDATKDIR)/lib64 -Wl,-rpath,$(CUDATKDIR)/lib64 CUDA_LDLIBS = -lcublas -lcudart -lcurand

  1. In the same Makefile add this to the end of the CXXFLAGS definition: \ <newline-here> -DHAVE_CUDA $(CUDA_INCLUDE)
  2. And add this to the end of the line starting with LDFLAGS =: $(CUDA_LDFLAGS) $(CUDA_LDLIBS)
  3. Then run the Alex ASR setup script to clone the Kaldi sources from Github and start compiling: python setup.py build.
  4. The compilation process will result in an error when building a shared version of the libfst.a library.
  5. cd into the <repo-dir>/libs/kaldi/tools/openfst directory and run the following command manually: ./configure –prefix=`pwd` –enable-static –enable-shared –enable-far –enable-ngram-fsts –with-pic CXX=g++ CXXFLAGS=“-fPIC” LDFLAGS=“” LIBS=“-ldl”
  6. Rerun python setup.py build from the <repo-dir> and the compilation process should now be successfully completed (i.e. without errors).

The above modifications were tested after having succesfully completed the default compile instructions on Alex ASR's github page.
Locally installed NVIDIA CUDA version was 7.5: https://developer.nvidia.com/cuda-75-downloads-archive.
Alex ASR was compiled against version hash 261fbb540a2dd40cb5248258dcbea77f4fdeee49 of the Kaldi ASR git repo instead of the one pointed at by Alex ASR's scripts.

alex_asr.txt · Last modified: 2017/04/04 14:55 by mganzeboom