forked from claritylab/lucida
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile-sirius-servers.sh
executable file
·89 lines (74 loc) · 1.67 KB
/
compile-sirius-servers.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/env bash
# exit if any server fails
set -e
# compiles all servers
hash javac 2>/dev/null || {
echo >&2 "$0: [ERROR] javac is not installed. Aborting."
exit 1
}
hash ant 2>/dev/null || {
echo >&2 "$0: [ERROR] ant is not installed. Aborting."
exit 1
}
# thread for parallel build
THREADS=4
asr_ps=speech-recognition/pocketsphinx
asr_sphinx=speech-recognition/sphinx
asr_kaldi=speech-recognition/kaldi
qa=question-answer
imm=image-matching
export MODELS_PATH="`pwd`/sphinx/models/"
################
# Sphinx
################
cd $asr_sphinx;
javac -cp .:./lib/servlet.jar:./lib/jetty.jar:lib/sphinx4.jar Sphinx4Server.java
echo "Sphinx4 server done."
##################
# Java PocketSphinx
##################
javac -cp .:./lib/servlet.jar:./lib/jetty.jar:./lib/pocketsphinx.jar PocketsphinxServer.java
cd - > /dev/null
echo "Java Pocketsphinx server done."
##################
# C++ PocketSphinx
##################
cd $asr_ps
./compile.sh
cd - > /dev/null
echo "C++ Pocketsphinx server done."
################
# Kaldi
################
cd $asr_kaldi
# Untar the src and tools tarball
if [ ! -d tools ]; then
tar -xzf tools.tar.gz
cd ./tools/
make -j $THREADS 1>/dev/null
cd ..
fi
tar -xzf src.tar.gz --overwrite
cd ./src/
./configure 1>/dev/null
make -j $THREADS 1>/dev/null
cd ./online2bin
make -j $THREADS 1>/dev/null
cd ../../../../
echo "Kaldi server done."
################
# OpenEphyra
################
if [ ! -d question-answer ]; then
tar -xzf question-answer.tar.gz
fi
cd $qa;
ant > /dev/null
cd - > /dev/null
echo "OpenEphyra server done."
################
# Image Matching
################
cd $imm
make -j$THREADS 1>/dev/null
echo "Image-matching server done."