install_kaldi.sh 688 字节
Newer Older
H
Hui Zhang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/bin/bash

# Installation script for Kaldi
#
set -e

apt-get install subversion -y

KALDI_GIT="--depth 1 -b master https://github.com/kaldi-asr/kaldi.git"

KALDI_DIR="$PWD/kaldi"

if [ ! -d "$KALDI_DIR" ]; then
    git clone $KALDI_GIT $KALDI_DIR
else
    echo "$KALDI_DIR already exists!"
fi

cd "$KALDI_DIR/tools"
git pull

# Prevent kaldi from switching default python version
mkdir -p "python"
touch "python/.use_default_python"

./extras/check_dependencies.sh

make -j4

H
Hui Zhang 已提交
30 31
pushd ../src
./configure --shared --use-cuda=no --static-math --mathlib=OPENBLAS --openblas-root=${KALDI_DIR}/../OpenBLAS/install
H
Hui Zhang 已提交
32
make clean -j && make depend -j && make -j4
H
Hui Zhang 已提交
33
popd
H
Hui Zhang 已提交
34 35

echo "Done installing Kaldi."