-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·255 lines (201 loc) · 5.69 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
#!/bin/bash
if [ -z "$1" ]
then
echo ""
echo "# Copyright 2015 Manuel Soukup"
echo "# License: GPL"
echo ""
echo ""
echo "This script will install some basic files and the MarryTTS Server on your PC"
echo "It will be installed in /home/USER/.linjark"
echo ""
echo "It will also guide and provide basic guidiance to install Simon and the speech model"
echo ""
echo "To start the install restart the script with ./install.sh i"
exit
fi
if [ "$1" == 'i' ]
then
echo ""
echo "Creating folders"
echo ""
cd ~
mkdir .linjark
mkdir .linjark/scripts
mkdir .linjark/conky
mkdir .linjark/bin
cd .linjark/
echo ""
echo "Downloading/Install MarryTTS...."
echo ""
wget https://github.com/marytts/marytts/releases/download/v5.1.2/marytts-5.1.2.zip
unzip marytts-5.1.2.zip && cd marytts-5.1.2/ && wget https://github.com/ManuGithubSteam/LinJarK/raw/master/data/marry_5.1_voice.tar.gz && tar xf marry_5.1_voice.tar.gz
cd bin
chmod +x marytts-server.sh
chmod +x marytts-component-installer.sh
cd ..
cd ..
cd ~
cd .linjark
wget https://github.com/ManuGithubSteam/LinJarK/raw/master/data/start_marry.sh
chmod +x start_marry.sh
wget https://github.com/ManuGithubSteam/LinJarK/raw/master/data/start_daemon.sh
chmod +x start_daemon.sh
wget https://github.com/ManuGithubSteam/LinJarK/raw/master/data/linjark_daemon.sh
chmod +x linjark_daemon.sh
cd ~
echo ""
echo "Open INSTALL manual"
echo ""
suc="n"
if [ -f /usr/bin/firefox ] && [ "$suc" == "n" ]
then
firefox https://manugithubsteam.github.io/LinJarK/install.html
suc="y"
fi
if [ -f /usr/bin/chromium ]&& [ "$suc" == "n" ]
then
chromium https://manugithubsteam.github.io/LinJarK/install.html
suc="y"
fi
if [ -f /usr/bin/opera ]&& [ "$suc" == "n" ]
then
opera https://manugithubsteam.github.io/LinJarK/install.html
suc="y"
fi
if [ -f /usr/bin/konqueror ]&& [ "$suc" == "n" ]
then
konqueror https://manugithubsteam.github.io/LinJarK/install.html
suc="y"
fi
if [ -f /usr/bin/epiphany ]&& [ "$suc" == "n" ]
then
epiphany https://manugithubsteam.github.io/LinJarK/install.html
suc="y"
fi
# echo ""
# echo "Install Marry language pack, see readme for the right one :-)"
# echo ""
# ./marytts-component-installer.sh
#
cd ~
echo ""
echo "Downloading Simon repair training data script"
echo ""
wget https://github.com/ManuGithubSteam/LinJarK/raw/master/data/Simon_repair_training_data.sh
chmod +x Simon_repair_training_data.sh
echo ""
echo "Downloading LM for Simon"
echo ""
wget https://github.com/ManuGithubSteam/LinJarK/raw/master/data/voxforge-de-r20141117.sbm
cd .linjark/
wget https://github.com/ManuGithubSteam/LinJarK/raw/master/data/voxforge-de-r20141117_dict.dic
cd ~
echo ""
echo "Edit PATH variable to be able to launch scripts"
echo ""
echo "PATH=\$PATH:/home/$USER/.linjark/bin" >> .bashrc
echo "export PATH" >> .bashrc
mkdir bin
awk_path="/home/$USER/bin/simon"
cat > "${awk_path}" <<EOT
#!/bin/bash
ON_PI="no"
simond &
PATH=$PATH:/home/$USER/.linjark/bin simon &
if [ "\$ON_PI" == "yes" ]
then
sleep 4
wmctrl -a Simon
sleep 1 && xdotool key Control+t
fi
EOT
chmod u+x "${awk_path}"
cd ~/bin
chmod +x simon
cd ~
echo ""
echo ""
echo "#########"
echo "# ATTENTION!!! PATH variable is modified to be able to launch scripts in .linjark/bin"
echo "# .bashrc was altered!"
echo "#"
echo "# PATH=$PATH:/home/$USER/.linjark/bin "
echo "# make sure it gets exported everytime before you start Simon!"
echo "#"
echo "# You can start simon in a bash normaly, as the Path is in your .bashrc"
echo "#"
echo "# You can start simon like this from a non bash terminal: "
echo "#"
echo "# PATH=$PATH:/home/$USER/.linjark/bin simon"
echo "#"
echo "# Or you use the 'linjark' start script in $HOME/bin"
echo "#"
echo "# To get rid of the 'bin' in you home, you can copy the linjark script to /usr/local/bin"
echo "#"
echo "#"
echo "#########"
echo ""
PATH=$PATH:/home/$USER/.linjark/bin
export PATH
echo ""
echo "Making MarryTTS Autostart on KDE Login"
echo ""
cd .kde4
mkdir Autostart
cd Autostart
ln -s ../../.linjark/start_marry.sh
echo ""
echo "Making Linjark daemon Autostart on KDE Login"
echo ""
cd .kde4
mkdir Autostart
cd Autostart
ln -s ../../.linjark/start_daemon.sh
echo ""
echo "Downloading sample_fix script"
echo ""
cd ~
cd .kde4/share/apps
mkdir simon
cd simon
mkdir model
cd model
wget https://raw.githubusercontent.com/ManuGithubSteam/LinJarK/master/data/fix_names.py
cd ~
echo ""
echo " Please specify your gender/sex:"
echo ""
echo "This will allow MarryTTS to resond to you in the right words :-D"
echo ""
echo "Press [m] for male, [f] for female"
echo ""
read SEX
if [ "$SEX" == 'm' ]
then
echo " Sir " > /home/$USER/.linjark/gender
fi
if [ "$SEX" == 'f' ]
then
echo " Miss " > /home/$USER/.linjark/gender
fi
if [ ! -f /home/$USER/.linjark/gender ]
then
echo " Sir " > /home/$USER/.linjark/gender
fi
echo ""
echo ""
echo " Intallation finished"
echo ""
echo ""
echo " Now install Simon and download an install some modules :-D"
echo ""
echo ""
echo " After the installation of Simon, you can start Simon with $USER/bin/simon"
echo ""
echo ""
echo " Get your guns and have fun with your own electronic butler....."
echo ""
cd ~
rm install.sh
fi