Skip to content

Instantly share code, notes, and snippets.

@ArashHosseini
Last active November 14, 2019 16:25
Show Gist options
  • Save ArashHosseini/b56e498ba7bd205287efab7fbb05775a to your computer and use it in GitHub Desktop.
Save ArashHosseini/b56e498ba7bd205287efab7fbb05775a to your computer and use it in GitHub Desktop.
installing pykaldi, pyhton wrapper for kaldi
#install Dependencies
sudo apt-get install autoconf automake cmake curl g++ git graphviz libatlas3-base libtool make pkg-config subversion unzip wget zlib1g-dev
#install protobuf for python and cpp
# To build protobuf from source, the following tools are needed:
sudo apt-get install autoconf automake libtool curl make g++ unzip
#download cpp
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.5.0/protobuf-cpp-3.5.0.tar.gz
#unpack them
sudo tar xzf protobuf-cpp-3.5.0.tar.gz
cd protobuf-3.5.0
sudo ./configure
sudo make
sudo make check
#the output should be like:
#============================================================================
#Testsuite summary for Protocol Buffers 3.5.0
#============================================================================
# TOTAL: 7
# PASS: 7
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
sudo make install
# refresh shared library cache
sudo ldconfig
mkdir protobuf-py
cd protobuf-py
#download python
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.5.0/protobuf-python-3.5.0.tar.gz
sudo tar xzf protobuf-python-3.5.0.tar.gz
cd protobuf-3.5.0
sudo ./configure
sudo make
sudo make check
sudo make install
# refresh shared library cache
sudo ldconfig
git clone https://github.com/pykaldi/pykaldi.git
cd pykaldi/tools
#change all python versions to python 3 in all bash files by PYTHON=python3.5 or target version
./check_dependencies.sh # checks if system dependencies are installed
./install_protobuf.sh # installs both the C++ library and the Python package
./install_clif.sh # installs both the C++ library and the Python package
./install_kaldi.sh # installs the C++ library
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment