-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_kaldi.sh
executable file
·44 lines (37 loc) · 1.13 KB
/
install_kaldi.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
PROG=`basename $0`;
usage="Usage: $PROG <arguments>\n
Installs KALDI in a specified directory.\n\n
Required arguments:\n
--root-dir=DIR\tName of the directory where the kaldi/ directory will be created.
";
if [ $# -lt 1 ]; then
echo -e $usage; exit 1;
fi
for i in "$@"
do
case "$i" in
--root-dir=*)
dir_name="${i#*=}"
shift ;;
*) echo "Unknown argument: $1, exiting"; echo -e $usage; exit 1 ;;
esac
done
INSTALLDIR=${dir_name}/kaldi
mkdir -p ${INSTALLDIR}
echo "Installing KALDI in ${INSTALLDIR}"
echo \
$'\n#################################################
Cloning KALDI source from GitHub
#################################################\n'
git clone https://github.com/kaldi-asr/kaldi.git $INSTALLDIR
echo \
$'\n#################################################
Building KALDI tools
#################################################\n'
cd $INSTALLDIR/tools && make -j 4
echo \
$'\n#################################################
Building KALDI binaries
#################################################\n'
cd ../src && ./configure --shared --use-cuda=yes && make -j 4