-
Notifications
You must be signed in to change notification settings - Fork 22
/
demo.xml
211 lines (194 loc) · 8.29 KB
/
demo.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Apache Ant build file used to build the FreeTTS demos. * -->
<!-- * To build the demos, just type the following: * -->
<!-- * * -->
<!-- * ant -buildfile demo.xml * -->
<!-- * * -->
<!-- * For more information: http://ant.apache.org/ * -->
<!-- * * -->
<!-- ********************************************************** -->
<project basedir="." default="all" name="FreeTTS">
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Where to find things... * -->
<!-- * * -->
<!-- ********************************************************** -->
<path id="libs">
<fileset dir="lib" includes="**/*.jar"/>
</path>
<property name="src_dir" value="."/>
<property name="build_dir" value="bld"/>
<property name="classes_dir" value="${build_dir}/classes"/>
<property name="demo_classes_dir" value="${build_dir}/demo_classes"/>
<property name="lib_dir" value="lib"/>
<property name="bin_dir" value="bin"/>
<property name="webstart_bld_dir" value="${build_dir}/webstart"/>
<property name="deploy_dir" value="deploy"/>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Builds just the demos (using package names for the * -->
<!-- * demos would have made this easier). * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="all"
depends="make_lib_dir,
compile_demo_util,
compile_freetts_demos"
description="Compiles and jars the demos"/>
<target name="make_lib_dir">
<mkdir dir="${lib_dir}"/>
</target>
<target name="compile_demo_util"
description="Compiles utilities used by some of the demos">
<mkdir dir="${demo_classes_dir}/util"/>
<javac debug="true"
source="1.4"
deprecation="true"
srcdir="demo/util"
destdir="${demo_classes_dir}/util">
<classpath>
<path refid="libs"/>
</classpath>
</javac>
</target>
<!-- freetts demos -->
<target name="compile_freetts_demos"
depends="compile_freetts_clientserver,
compile_freetts_emacspeak,
compile_freetts_helloworld"
description="Compiles freetts demos"/>
<target name="compile_freetts_clientserver"
depends="compile_demo_util">
<mkdir dir="${demo_classes_dir}/freetts/ClientServer"/>
<javac debug="true"
source="1.4"
deprecation="true"
srcdir="demo/freetts/ClientServer"
destdir="${demo_classes_dir}/freetts/ClientServer">
<classpath>
<path refid="libs"/>
<pathelement location="${demo_classes_dir}/util"/>
</classpath>
</javac>
<mkdir dir="${bin_dir}"/>
<jar destfile="${bin_dir}/Client.jar"
manifest="demo/freetts/ClientServer/client.Manifest"
basedir="${demo_classes_dir}/freetts/ClientServer"
includes="Client.class"
filesonly="true"
compress="true"/>
<jar destfile="${bin_dir}/Server.jar"
manifest="demo/freetts/ClientServer/server.Manifest"
filesonly="true"
compress="true">
<fileset dir="${demo_classes_dir}/freetts/ClientServer"
excludes="Client.class"/>
<fileset dir="${demo_classes_dir}/util"
includes="TTSServer.class"/>
</jar>
</target>
<target name="compile_freetts_emacspeak"
depends="compile_demo_util">
<mkdir dir="${demo_classes_dir}/freetts/Emacspeak"/>
<javac debug="true"
source="1.4"
deprecation="true"
srcdir="demo/freetts/Emacspeak"
destdir="${demo_classes_dir}/freetts/Emacspeak">
<classpath>
<path refid="libs"/>
<pathelement location="${demo_classes_dir}/util"/>
</classpath>
</javac>
<mkdir dir="${bin_dir}"/>
<jar destfile="${bin_dir}/FreeTTSEmacspeakServer.jar"
manifest="demo/freetts/Emacspeak/Manifest"
filesonly="true"
compress="true">
<fileset dir="${demo_classes_dir}/freetts/Emacspeak"/>
<fileset dir="${demo_classes_dir}/util"
includes="EmacspeakProtocolHandler.class,
TTSServer.class"/>
</jar>
</target>
<target name="compile_freetts_helloworld"
depends="compile_demo_util">
<mkdir dir="${demo_classes_dir}/freetts/HelloWorld"/>
<javac debug="true"
source="1.4"
deprecation="true"
srcdir="demo/freetts/HelloWorld"
destdir="${demo_classes_dir}/freetts/HelloWorld">
<classpath>
<path refid="libs"/>
<pathelement location="${demo_classes_dir}/util"/>
</classpath>
</javac>
<mkdir dir="${bin_dir}"/>
<jar destfile="${bin_dir}/FreeTTSHelloWorld.jar"
manifest="demo/freetts/HelloWorld/Manifest"
basedir="${demo_classes_dir}/freetts/HelloWorld"
includes="*.class"
filesonly="true"
compress="true"/>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Makes a standalone emacspeak server jar * -->
<!-- * that can be run using java -jar. * -->
<!-- * * -->
<!-- * NOTE: This requires an "ant" to have been run so that * -->
<!-- * the classes directory will be fully populated. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="emacspeak-server"
depends="compile_freetts_emacspeak">
<mkdir dir="${build_dir}/tmp/com/sun/speech/freetts"/>
<copy file="lib/voices.txt"
tofile="${build_dir}/tmp/com/sun/speech/freetts/internal_voices.txt"/>
<replace
file="${build_dir}/tmp/com/sun/speech/freetts/internal_voices.txt"
token="com.sun.speech.freetts.en.us.cmu_time_awb.AlanVoiceDirectory"
value="#com.sun.speech.freetts.en.us.cmu_time_awb.AlanVoiceDirectory"/>
<replace
file="${build_dir}/tmp/com/sun/speech/freetts/internal_voices.txt"
token="#de.dfki.lt.freetts.en.us.MbrolaVoiceDirectory"
value="de.dfki.lt.freetts.en.us.MbrolaVoiceDirectory"/>
<jar destfile="emacspeak-server.jar"
compress="true">
<fileset dir="${classes_dir}"
excludes="com/sun/speech/engine/**,
com/sun/speech/freetts/en/us/CMUTime**,
com/sun/speech/freetts/en/us/cmutime**,
com/sun/speech/freetts/en/us/cmu_time**"/>
<fileset
dir="${src_dir}"
includes="com/sun/speech/freetts/en/us/*.txt"
excludes="**/cmu*lex*.txt"/>
<fileset dir="${demo_classes_dir}/util"
excludes="Time**"/>
<fileset dir="${demo_classes_dir}/freetts/Emacspeak"/>
<fileset dir="${build_dir}/tmp"/>
<manifest>
<attribute name="Main-Class"
value="FreeTTSEmacspeakServer"/>
</manifest>
</jar>
<delete dir="${build_dir}/tmp"/>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Deletes all build output and *~ file droppings * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="clean" description="Delete all build output">
<delete quiet="true" includeEmptyDirs="true">
<fileset defaultexcludes="no" dir="." includes="**/*~"/>
</delete>
<delete dir="${bin_dir}"/>
<delete dir="${build_dir}"/>
<delete dir="${deploy_dir}"/>
</target>
</project>