User Tools

Site Tools


alex_asr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
alex_asr [2017/04/04 14:52]
mganzeboom
alex_asr [2017/04/04 14:55] (current)
mganzeboom
Line 4: Line 4:
  
 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: 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:
-  - Open <repo-dir>/prepare_env.sh and change the line './configure --shared' to './configure --shared --use-cuda=yes' under the section 'Configure Kaldi' +  - Open ''<repo-dir>/prepare_env.sh'' and change the line ''./configure --shared' to './configure --shared --use-cuda=yes'' under the section ''Configure Kaldi'
-  - Open <repo-dir>/Makefile and add the following lines at the top:+  - Open ''<repo-dir>/Makefile'' and add the following lines at the top:
 ''CUDATKDIR = <add local path to CUDA dir here, usually /usr/local/cuda> ''CUDATKDIR = <add local path to CUDA dir here, usually /usr/local/cuda>
 CUDA_INCLUDE= -I$(CUDATKDIR)/include CUDA_INCLUDE= -I$(CUDATKDIR)/include
 CUDA_LDFLAGS = -L$(CUDATKDIR)/lib64 -Wl,-rpath,$(CUDATKDIR)/lib64 CUDA_LDFLAGS = -L$(CUDATKDIR)/lib64 -Wl,-rpath,$(CUDATKDIR)/lib64
 CUDA_LDLIBS = -lcublas -lcudart -lcurand'' CUDA_LDLIBS = -lcublas -lcudart -lcurand''
-  - In the same Makefile add this to the end of the 'CXXFLAGS' definition:  ''\ +  - In the same Makefile add this to the end of the ''CXXFLAGS'' definition:  ''<newline-here> -DHAVE_CUDA $(CUDA_INCLUDE)'' 
-      -DHAVE_CUDA $(CUDA_INCLUDE)'' +  - And add this to the end of the line starting with ''LDFLAGS ='':'' $(CUDA_LDFLAGS) $(CUDA_LDLIBS)'' 
-  - And add this to the end of the line starting with 'LDFLAGS =':'' $(CUDA_LDFLAGS) $(CUDA_LDLIBS)'' +  - Then run the Alex ASR setup script to clone the Kaldi sources from Github and start compiling: ''python setup.py build''.
-  - Then run the Alex ASR setup script to clone the Kaldi sources from Github and start compiling: python setup.py build.+
   - The compilation process will result in an error when building a shared version of the libfst.a library.   - The compilation process will result in an error when building a shared version of the libfst.a library.
-  - 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" +  - 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"'' 
-  - Rerun python setup.py build from the <repo-dir> and the compilation process should now be successfully completed (i.e. without errors).+  - 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.\\ 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.\\+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 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.1491310365.txt.gz · Last modified: 2017/04/04 14:52 by mganzeboom