-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·51 lines (39 loc) · 1.61 KB
/
install.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
45
46
47
48
49
50
51
#!/usr/bin/env bash
source path.sh
# Check directories required by Kaldi
if [ ! -d $KALDI_ROOT ]; then
echo "It seems that your KALDI_ROOT dir doesn't exist. The current value is \"$KALDI_ROOT\"."
echo "Please be sure to edit path.sh with the correct values."
exit 1
fi
# Create required symlinks
utils_link="utils"
steps_link="steps"
local_link="local"
rm $utils_link $steps_link $local_link 2> /dev/null
ln -s $KALDI_ROOT/egs/swbd/s5b/utils $utils_link
ln -s $KALDI_ROOT/egs/swbd/s5b/steps $steps_link
ln -s $KALDI_ROOT/egs/swbd/s5b/local $local_link
# Check Kaldi models and files
if [ ! -d $KALDI_MODELS ]; then
echo "It seems that your KALDI_MODELS dir doesn't exist. The current value is \"$KALDI_MODELS\"."
echo "Please be sure to edit path.sh with the correct values."
exit 1
fi
if [ ! -e $KALDI_MODELS/graph ] || [ ! -e $KALDI_MODELS/graph/HCLG.fst.map ] ; then
echo "You need a \"graph\" directory (or symlink) in your $KALDI_MODELS dir."
echo "This dir should contain a \"HCLG.fst.map\" file (mapped with openfst cf. http://www.lvcsr.com/openfst-133-mapped-files.html )."
exit 1
fi
if [ ! -e $KALDI_MODELS/model ] || [ ! -e $KALDI_MODELS/model/final.nnet ]; then
echo "You need a \"model\" directory (or symlink) in your $KALDI_MODELS dir."
echo "This dir should contain a \"final.nnet\" file."
exit 1
fi
if [ ! -e $KALDI_MODELS/3g ] || [ ! -e $KALDI_MODELS/3g/G.fst.phi.sort ]; then
echo "You need a \"3g\" directory (or symlink) in your $KALDI_MODELS dir."
echo "This dir should contain a \"G.fst.phi.sort\" file."
exit 1
fi
# Everything is ok, return 0
exit 0