File: build.xml

package info (click to toggle)
freetts 1.2.2-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 65,236 kB
  • sloc: java: 21,305; xml: 1,340; sh: 969; lisp: 587; ansic: 241; makefile: 25; awk: 11
file content (1181 lines) | stat: -rw-r--r-- 49,774 bytes parent folder | download | duplicates (2)
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
<?xml version="1.0" encoding="UTF-8"?>

<!-- ********************************************************** -->
<!-- *                                                        * -->
<!-- * Apache Ant build file used to build FreeTTS.  To build * -->
<!-- * everything, just type the following:                   * -->
<!-- *                                                        * -->
<!-- *     ant                                                * -->
<!-- *                                                        * -->
<!-- * For more information:  http://ant.apache.org/          * -->
<!-- *                                                        * -->
<!-- ********************************************************** -->
<project basedir="." default="all" name="FreeTTS">

    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Where to find things...                                * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <property name="version" value="1.2.2" />
    <path id="libs">
        <fileset dir="lib" includes="**/jsapi.jar" />
    </path>
    <property name="src_dir" value="src" />
    <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="mbrola_dir" value="mbrola" />
    <property name="bin_dir" value="bin" />
    <property name="javadoc_dir" value="javadoc" />
    <property name="webstart_dir" value="${build_dir}/webstart" />
    <property name="deploy_dir" value="deploy" />


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Determine which sources should be compiled depending   * -->
    <!-- * on the availability of lib/jsapi.jar.  This creates a  * -->
    <!-- * property called "patternset_to_compile" and sets its   * -->
    <!-- * val to either "all_files" or "no_jsapi", which refers  * -->
    <!-- * to the name of a patternset. The value of              * -->
    <!-- * srcs_to_compile will be used in the javac target as a  * -->
    <!-- * patternset refid.                                      * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <patternset id="all_files" includes="com/**,de/**" />

    <patternset id="no_jsapi"
                includes="com/**,de/**"
                excludes="com/sun/speech/engine/**,
		          com/sun/speech/freetts/jsapi/**" />

    <target name="set_patternset_to_compile">
        <condition property="patternset_to_compile" value="all_files">
            <available file="lib/jsapi.jar" />
        </condition>
        <condition property="patternset_to_compile" value="no_jsapi">
            <not>
                <available file="lib/jsapi.jar" />
            </not>
        </condition>
    </target>

    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Handle JSAPI:                                          * -->
    <!-- *                                                        * -->
    <!-- *    1) If a jsapi.jar file can be found, use it and     * -->
    <!-- *       compile all the sources.                         * -->
    <!-- *                                                        * -->
    <!-- *    2) If a jsapi.jar file cannot be found, issue a     * -->
    <!-- *       message and just compile the sources that do     * -->
    <!-- *       not depend upon jsapi.jar.                       * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="check_jsapi_jar.isPresent">
        <available file="lib/jsapi.jar" property="jsapi_jar.isPresent" />
    </target>

    <target name="issue_jsapi_warning" unless="jsapi_jar.isPresent">
        <echo>
Cannot find lib/jsapi.jar needed to build Java Speech API
(JSAPI) support for FreeTTS.  Will not build any sources
that require jsapi.jar.  If you'd like to enable JSAPI
support, please extract jsapi.jar by running jsapi.sh or 
jsapi.exe from the lib directory.
        </echo>
    </target>

    <target name="handle_jsapi"
            depends="check_jsapi_jar.isPresent,
                     issue_jsapi_warning,
                     set_patternset_to_compile" />


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Builds srcs, voices, lexicons, jars, demos             * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="all"
            depends="compile,jars,demos"
            description="Build everything">
        <echo message="Build complete." />
    </target>


    <!-- compile everything -->
    <target name="compile"
            depends="compile_src,compile_voices,compile_lexicons"
            description="Build srcs, voices, and lexicons" />


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Builds just the srcs.  The tests are omitted.          * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="compile_src"
            depends="check_jsapi_jar.isPresent,
	             issue_jsapi_warning,
	             set_patternset_to_compile"
            description="Build just the srcs">
        <mkdir dir="${classes_dir}" />
        <javac debug="true"
               source="1.4"
               target="1.4"
               deprecation="true"
               srcdir="${src_dir}"
               excludes="tests/**"
               destdir="${classes_dir}">
            <patternset refid="${patternset_to_compile}" />
            <classpath refid="libs" />
        </javac>
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Builds just the tests - these need JUnit.              * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="compile_tests"
            depends="compile"
            description="Build just the tests">
        <mkdir dir="${classes_dir}" />
        <javac debug="true"
               source="1.4"
               target="1.4"
               deprecation="true"
               srcdir="${src_dir}"
               includes="tests/**"
               destdir="${classes_dir}">
            <classpath refid="libs" />
        </javac>
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Generates the binaries for the voices.                 * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="compile_voices"
            depends="kal8_db,kal16_db,time_awb_db,user_voice_db"
            description="Generate all of the voice binaries">
    </target>


    <!-- kal8 -->
    <property name="kal8_data" value="cmu_us_kal.txt" />
    <property name="kal8_path"
              value="com/sun/speech/freetts/en/us/cmu_us_kal" />
    <target name="check_kal8_db.isUpToDate"
            description="Compares timestamps of kal8 ASCII and binary">
        <uptodate property="kal8_db.isUpToDate"
                  srcfile="${src_dir}/${kal8_path}/${kal8_data}"
                  targetfile="${classes_dir}/${kal8_path}/cmu_us_kal.bin" />
    </target>

    <target name="kal8_db"
            depends="compile_src,check_kal8_db.isUpToDate"
            unless="kal8_db.isUpToDate"
            description="Generate kal8 voice binaries">
        <java classname="com.sun.speech.freetts.diphone.DiphoneUnitDatabase"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${kal8_path}" />
            <arg line="-dest ${classes_dir}/${kal8_path}" />
            <arg line="-generate_binary ${kal8_data}" />
        </java>
    </target>

    <!-- kal16 -->
    <property name="kal16_data" value="cmu_us_kal16.txt" />
    <property name="kal16_path"
              value="com/sun/speech/freetts/en/us/cmu_us_kal" />
    <target name="check_kal16_db.isUpToDate"
            description="Compares timestamps of kal16 ASCII and binary">
        <uptodate property="kal16_db.isUpToDate"
                  srcfile="${src_dir}/${kal16_path}/${kal16_data}"
                  targetfile="${classes_dir}/${kal16_path}/cmu_us_kal16.bin" />
    </target>

    <target name="kal16_db"
            depends="compile_src,check_kal16_db.isUpToDate"
            unless="kal16_db.isUpToDate"
            description="Generate kal16 binaries">
        <java classname="com.sun.speech.freetts.diphone.DiphoneUnitDatabase"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${kal16_path}" />
            <arg line="-dest ${classes_dir}/${kal16_path}" />
            <arg line="-generate_binary ${kal16_data}" />
        </java>
    </target>

    <!-- time_awb -->
    <property name="time_awb_data" value="cmu_time_awb.txt" />
    <property name="time_awb_path"
              value="com/sun/speech/freetts/en/us/cmu_time_awb" />
    <target name="check_time_awb_db.isUpToDate"
            description="Compares timestamps of time_awb ASCII and binary">
        <uptodate property="time_awb_db.isUpToDate"
                  srcfile="${src_dir}/${time_awb_path}/${time_awb_data}"
                  targetfile="${classes_dir}/${time_awb_path}/cmu_time_awb.bin" />
    </target>

    <target name="time_awb_db"
            depends="compile_src,check_time_awb_db.isUpToDate"
            unless="time_awb_db.isUpToDate"
            description="Generate time_awb binaries">
        <java classname="com.sun.speech.freetts.clunits.ClusterUnitDatabase"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${time_awb_path}" />
            <arg line="-dest ${classes_dir}/${time_awb_path}" />
            <arg line="-generate_binary ${time_awb_data}" />
        </java>
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * User defined voices (e.g., those created by the        * -->
    <!-- * FestVoxToFreeTTS tool) can be compiled by running      * -->
    <!-- * ant with the -D parameter to define either the         * -->
    <!-- * 'clunit_voice' or 'diphone_voice' property:            * -->
    <!-- *                                                        * -->
    <!-- *     -Darctic_voice=cmu_us_bdl_arctic                   * -->
    <!-- *     -Dclunit_voice=sun_time_wdw                        * -->
    <!-- *     -Ddiphone_voice=sun_us_wdw                         * -->
    <!-- *                                                        * -->
    <!-- * If the voice is to be created at a custom path         * -->
    <!-- * (e.g., for non-us-English voices), the following       * -->
    <!-- * property can OPTIONALLY be set:                        * -->
    <!-- *                                                        * -->
    <!-- *     -Duser_voice_base_path=de/dfki/lt/freetts/de       * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="set_user_voice_to_clunit_voice" if="clunit_voice">
        <property name="user_voice" value="${clunit_voice}" />
    </target>
    <target name="set_user_voice_to_diphone_voice" if="diphone_voice">
        <property name="user_voice" value="${diphone_voice}" />
    </target>
    <target name="set_user_voice"
            depends="set_user_voice_to_clunit_voice,
                     set_user_voice_to_diphone_voice">
        <property name="user_voice_base_path"
                  value="com/sun/speech/freetts/en/us" />
        <property name="user_voice_path"
                  value="${user_voice_base_path}/${user_voice}" />
    </target>

    <target name="check_user_voice_db.isUpToDate"
            depends="set_user_voice"
            description="Compares timestamps of user voice ASCII and binary">
        <uptodate property="user_voice_db.isUpToDate"
                  srcfile="${src_dir}/${user_voice_path}/${user_voice}.txt"
                  targetfile="${classes_dir}/${user_voice_path}/${user_voice}.bin" />
    </target>

    <target name="user_voice_db"
            depends="set_user_voice,
	             clunit_voice_db,
                     diphone_voice_db"
            if="user_voice"
            description="Generate user voice binaries" />

    <target name="clunit_voice_db"
            depends="compile_src,check_user_voice_db.isUpToDate"
            if="clunit_voice"
            unless="user_voice_db.isUpToDate"
            description="Generate user voice binaries">
        <java classname="com.sun.speech.freetts.clunits.ClusterUnitDatabase"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${user_voice_path}" />
            <arg line="-dest ${classes_dir}/${user_voice_path}" />
            <arg line="-generate_binary ${user_voice}.txt" />
        </java>
        <copy todir="${classes_dir}/${user_voice_path}" failonerror="false">
            <fileset dir="${src_dir}/${user_voice_path}"
                     includes="phoneset.txt ${user_voice}.debug" />
        </copy>
    </target>

    <target name="diphone_voice_db"
            depends="compile_src,check_user_voice_db.isUpToDate"
            if="diphone_voice"
            unless="user_voice_db.isUpToDate"
            description="Generate user voice binaries">
        <java classname="com.sun.speech.freetts.diphone.DiphoneUnitDatabase"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${user_voice_path}" />
            <arg line="-dest ${classes_dir}/${user_voice_path}" />
            <arg line="-generate_binary ${user_voice}.txt" />
        </java>
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Generate the binaries for the lexicons                 * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="compile_lexicons"
            depends="cmulex_db,cmudict04_db,cmutimelex_db"
            description="Generate cmulex, cmudict04, and cmutimelex binaries">
    </target>

    <!-- cmulex -->
    <property name="cmulex_data" value="cmulex" />
    <property name="cmulex_path" value="com/sun/speech/freetts/en/us" />

    <!-- The *_{compiled,addenda}.bin files are created at once.
         So, if any of the *.txt files are newer than one of these
         files (I chose *_compiled.bin), then recreate the *.bin files.
    -->
    <target name="check_cmulex_db.isUpToDate"
            description="Compares timestamps of cmulex ASCII and binary">
        <uptodate property="cmulex_db.isUpToDate"
                  targetfile="${classes_dir}/${cmulex_path}/${cmulex_data}_compiled.bin">
            <srcfiles dir="${src_dir}/${cmulex_path}"
                      includes="${cmulex_data}_*.txt" />
        </uptodate>
    </target>

    <target name="cmulex_db"
            depends="compile_src,
	             check_cmulex_db.isUpToDate,
	             cmulex_lts_db"
            unless="cmulex_db.isUpToDate"
            description="Generate cmulex compiled and addenda binaries">
        <java classname="com.sun.speech.freetts.en.us.CMULexicon"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${cmulex_path}" />
            <arg line="-dest ${classes_dir}/${cmulex_path}" />
            <arg line="-name ${cmulex_data}" />
            <arg line="-generate_binary" />
        </java>
    </target>


    <target name="check_cmulex_lts_db.isUpToDate"
            description="Compares timestamps of cmulex_lts ASCII and binary">
        <uptodate property="cmulex_lts_db.isUpToDate"
                  srcfile="${src_dir}/${cmulex_path}/${cmulex_data}_lts.txt"
                  targetfile="${classes_dir}/${cmulex_path}/${cmulex_data}_lts.bin" />
    </target>

    <target name="cmulex_lts_db"
            depends="compile_src,check_cmulex_lts_db.isUpToDate"
            unless="cmulex_lts_db.isUpToDate"
            description="Generate cmulex lts binary">
        <java classname="com.sun.speech.freetts.lexicon.LetterToSoundImpl"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${cmulex_path}" />
            <arg line="-dest ${classes_dir}/${cmulex_path}" />
            <arg line="-name ${cmulex_data}_lts" />
            <arg line="-generate_binary" />
        </java>
    </target>


    <!-- cmudict04 -->
    <property name="cmudict04_data" value="cmudict04" />
    <property name="cmudict04_path" value="com/sun/speech/freetts/en/us" />

    <!-- The *_{compiled,addenda}.bin files are created at once.
         So, if any of the *.txt files are newer than one of these
         files (I chose *_compiled.bin), then recreate the *.bin files.
    -->
    <target name="check_cmudict04_db.isUpToDate"
            description="Compares timestamps of cmudict04 ASCII and binary">
        <uptodate property="cmudict04_db.isUpToDate"
                  targetfile="${classes_dir}/${cmudict04_path}/${cmudict04_data}_compiled.bin">
            <srcfiles dir="${src_dir}/${cmudict04_path}"
                      includes="${cmudict04_data}_*.txt" />
        </uptodate>
    </target>

    <target name="cmudict04_db"
            depends="compile_src,
	             check_cmudict04_db.isUpToDate,
	             cmudict04_lts_db"
            unless="cmudict04_db.isUpToDate"
            description="Generate cmudict04 compiled and addenda binaries">
        <java classname="com.sun.speech.freetts.en.us.CMULexicon"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${cmudict04_path}" />
            <arg line="-dest ${classes_dir}/${cmudict04_path}" />
            <arg line="-name ${cmudict04_data}" />
            <arg line="-generate_binary" />
        </java>
    </target>


    <target name="check_cmudict04_lts_db.isUpToDate"
            description="Compares timestamps of cmudict04_lts ASCII and binary">
        <uptodate property="cmudict04_lts_db.isUpToDate"
                  srcfile="${src_dir}/${cmudict04_path}/${cmudict04_data}_lts.txt"
                  targetfile="${classes_dir}/${cmudict04_path}/${cmudict04_data}_lts.bin" />
    </target>

    <target name="cmudict04_lts_db"
            depends="compile_src,check_cmudict04_lts_db.isUpToDate"
            unless="cmudict04_lts_db.isUpToDate"
            description="Generate cmudict04 lts binary">
        <java classname="com.sun.speech.freetts.lexicon.LetterToSoundImpl"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${cmudict04_path}" />
            <arg line="-dest ${classes_dir}/${cmudict04_path}" />
            <arg line="-name ${cmudict04_data}_lts" />
            <arg line="-generate_binary" />
        </java>
    </target>


    <!-- cmulextime -->
    <property name="cmutimelex_data" value="cmutimelex" />
    <property name="cmutimelex_path" value="com/sun/speech/freetts/en/us" />

    <!-- The *_{compiled,addenda}.bin files are created at once.
         So, if any of the *.txt files are newer than one of these
         files (I chose *_compiled.bin), then recreate the *.bin files.
    -->
    <target name="check_cmutimelex_db.isUpToDate"
            description="Compares timestamps of cmulextime ASCII and binary">
        <uptodate property="cmutimelex_db.isUpToDate"
                  targetfile="${classes_dir}/${cmutimelex_path}/${cmutimelex_data}_compiled.bin">
            <srcfiles dir="${src_dir}/${cmutimelex_path}"
                      includes="${cmutimelex_data}_*.txt" />
        </uptodate>
    </target>

    <target name="cmutimelex_db"
            depends="compile_src,
	             check_cmutimelex_db.isUpToDate,
	             cmutimelex_lts_db"
            unless="cmutimelex_db.isUpToDate"
            description="Generate cmutimelex compiled and addenda binaries">
        <java classname="com.sun.speech.freetts.en.us.CMULexicon"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${cmutimelex_path}" />
            <arg line="-dest ${classes_dir}/${cmutimelex_path}" />
            <arg line="-name ${cmutimelex_data}" />
            <arg line="-generate_binary" />
        </java>
    </target>


    <target name="check_cmutimelex_lts_db.isUpToDate"
            description="Compares timestamps of cmulextime_lts ASCII and binary">
        <uptodate property="cmutimelex_lts_db.isUpToDate"
                  srcfile="${src_dir}/${cmutimelex_path}/${cmutimelex_data}_lts.txt"
                  targetfile="${classes_dir}/${cmutimelex_path}/${cmutimelex_data}_lts.bin" />
    </target>

    <target name="cmutimelex_lts_db"
            depends="compile_src,check_cmutimelex_lts_db.isUpToDate"
            unless="cmutimelex_lts_db.isUpToDate"
            description="Generate cmutimelex lts binary">
        <java classname="com.sun.speech.freetts.lexicon.LetterToSoundImpl"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${cmutimelex_path}" />
            <arg line="-dest ${classes_dir}/${cmutimelex_path}" />
            <arg line="-name ${cmutimelex_data}_lts" />
            <arg line="-generate_binary" />
        </java>
    </target>


    <!-- German dummy lexicon -->
    <!-- As this is only a dummy at the moment, it is not added -->
    <!-- to the general compile_lexicons targert -->
    <property name="germanlex_data" value="germanlex" />
    <property name="germanlex_path" value="de/dfki/lt/freetts/de" />

    <!-- The *_{compiled,addenda}.bin files are created at once.
         So, if any of the *.txt files are newer than one of these
         files (I chose *_compiled.bin), then recreate the *.bin files.
    -->
    <target name="check_germanlex_db.isUpToDate"
            description="Compares timestamps of ASCII and binary">
        <uptodate property="germanlex_db.isUpToDate"
                  targetfile="${classes_dir}/${germanlex_path}/${germanlex_data}_compiled.bin">
            <srcfiles dir="${src_dir}/${germanlex_path}"
                      includes="${germanlex_data}_*.txt" />
        </uptodate>
    </target>

    <target name="germanlex_db"
            depends="compile_src,
	             check_germanlex_db.isUpToDate,
	             germanlex_lts_db"
            unless="germanlex_db.isUpToDate"
            description="Generate compiled and addenda binaries">
        <java classname="de.dfki.lt.freetts.de.GermanLexicon"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${germanlex_path}" />
            <arg line="-dest ${classes_dir}/${germanlex_path}" />
            <arg line="-name ${germanlex_data}" />
            <arg line="-generate_binary" />
        </java>
    </target>


    <target name="check_germanlex_lts_db.isUpToDate"
            description="Compares timestamps of germanlex_lts ASCII and binary">
        <uptodate property="germanlex_lts_db.isUpToDate"
                  srcfile="${src_dir}/${germanlex_path}/${germanlex_data}_lts.txt"
                  targetfile="${classes_dir}/${germanlex_path}/${germanlex_data}_lts.bin" />
    </target>

    <target name="germanlex_lts_db"
            depends="compile_src,check_germanlex_lts_db.isUpToDate"
            unless="germanlex_lts_db.isUpToDate"
            description="Generate germanlex lts binary">
        <java classname="com.sun.speech.freetts.lexicon.LetterToSoundImpl"
              failonerror="true"
              fork="true">
            <classpath>
                <path refid="libs" />
                <pathelement location="${classes_dir}" />
            </classpath>
            <arg line="-src ${src_dir}/${germanlex_path}" />
            <arg line="-dest ${classes_dir}/${germanlex_path}" />
            <arg line="-name ${germanlex_data}_lts" />
            <arg line="-generate_binary" />
        </java>
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Generates the jar files.                               * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="jars"
            depends="freetts_jar,
	             mbrola_jar,
	             en_us_jar,
	             cmulex_jar,
	             cmudict04_jar,
	             cmutimelex_jar,
	             cmu_us_kal_jar,
	             cmu_time_awb_jar,
	             arctic_voice_jar,
	             user_voice_jar"
            description="Builds all the jar files" />

    <!-- freetts.jar -->
    <property name="freetts__jsapi10_jar"
              value="${lib_dir}/freetts-jsapi10.jar" />
    <property name="freetts_jar" value="${lib_dir}/freetts.jar" />

    <target name="-freetts_jsapi10_jar" depends="compile_src">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${freetts__jsapi10_jar}" compress="true">
            <manifest>
                <attribute name="Built-By" value="${user.name}" />
                <section name="common">
                  <attribute name="Implementation-Title"
                      value="FreeTTS JSAPI 1.0 layer" />
                </section>
            </manifest>
            <fileset dir="${classes_dir}">
                <include name="com/sun/speech/engine/**"/>
                <include name="com/sun/speech/freetts/jsapi/**"/>
            </fileset>
        </jar>
    </target>

    <target name="freetts_jar"
            depends="-freetts_jsapi10_jar,compile_src"
            description="Create ${lib_dir}/freetts.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${freetts_jar}" compress="true">
            <manifest>
                <attribute name="Built-By" value="${user.name}" />
                <attribute name="Main-Class"
                      value="com.sun.speech.freetts.FreeTTS" />
                <section name="common">
                  <attribute name="Implementation-Title"
                      value="FreeTTS core library" />
                </section>
            </manifest>
            <fileset dir="${classes_dir}">
                <include name="com/sun/speech/freetts/**"/>
                <exclude name="com/sun/speech/freetts/en/**"/>
                <exclude name="com/sun/speech/freetts/jsapi/**"/>
                <include name="de/dfki/lt/freetts/**"/>
                <exclude name="de/dfki/lt/freetts/en/**"/>
                <exclude name="de/dfki/lt/freetts/de/**"/>
                <exclude name="de/dfki/lt/mbrola/**"/>
                <exclude name="tests/**"/>
                <exclude name="**/*.bin"/>
                <exclude name="**/*.idx"/>
            </fileset>
            <fileset dir="${src_dir}">
                <include name="com/sun/speech/freetts/internal_voices.txt"/>
            </fileset>
        </jar>
    </target>


    <!-- mbrola.jar -->
    <property name="mbrola_jar" value="${mbrola_dir}/mbrola.jar" />

    <target name="mbrola_jar"
            depends="compile_src"
            description="Create ${mbrola_dir}/mbrola.jar">
        <mkdir dir="${mbrola_dir}" />
        <jar destfile="${mbrola_jar}"
             manifest="${src_dir}/de/dfki/lt/freetts/en/us/Manifest"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="de/dfki/lt/freetts/mbrola/**,
                          de/dfki/lt/freetts/en/us//**" />
        </jar>
    </target>


    <!-- en_us.jar -->
    <property name="en_us_jar" value="${lib_dir}/en_us.jar" />

    <target name="en_us_jar"
            depends="compile_src"
            description="Create ${lib_dir}/en_us.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${en_us_jar}"
             manifest="${src_dir}/com/sun/speech/freetts/en/us/en_us.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="com/sun/speech/freetts/en/*.class,
	                  com/sun/speech/freetts/en/us/*.class" />
            <fileset dir="${src_dir}"
                     includes="com/sun/speech/freetts/en/us/*.txt"
                     excludes="**/cmu*lex*.txt" />
        </jar>
    </target>

    <!-- de.jar -->
    <!-- As this is only a dummy at the moment, it is not added -->
    <!-- to the general jars target -->
    <property name="de_jar" value="${lib_dir}/de.jar" />

    <target name="de_jar"
            depends="compile_src"
            description="Create ${lib_dir}/de.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${de_jar}"
             manifest="${src_dir}/de/dfki/lt/freetts/de/de.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="de/dfki/lt/freetts/de/*.class" />
            <fileset dir="${src_dir}"
                     includes="de/dfki/lt/freetts/de/*.txt"
                     excludes="**/*lex*.txt" />
        </jar>
    </target>


    <!-- cmulex.jar -->
    <property name="cmulex_jar" value="${lib_dir}/cmulex.jar" />

    <target name="cmulex_jar"
            depends="compile_lexicons"
            description="Create ${lib_dir}/cmulex.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${cmulex_jar}"
             manifest="${src_dir}/com/sun/speech/freetts/en/us/cmulex.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="com/sun/speech/freetts/en/us/cmulex_*.bin" />
        </jar>
    </target>


    <!-- cmudict04.jar -->
    <property name="cmudict04_jar" value="${lib_dir}/cmudict04.jar" />

    <target name="cmudict04_jar"
            depends="compile_lexicons"
            description="Create ${lib_dir}/cmudict04.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${cmudict04_jar}"
             manifest="${src_dir}/com/sun/speech/freetts/en/us/cmudict04.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="com/sun/speech/freetts/en/us/cmudict04_*.bin" />
        </jar>
    </target>


    <!-- cmutimelex.jar -->
    <property name="cmutimelex_jar" value="${lib_dir}/cmutimelex.jar" />

    <target name="cmutimelex_jar"
            depends="compile_lexicons"
            description="Create ${lib_dir}/cmutimelex.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${cmutimelex_jar}"
             manifest="${src_dir}/com/sun/speech/freetts/en/us/cmutimelex.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="com/sun/speech/freetts/en/us/cmutimelex_*.bin" />

        </jar>
    </target>


    <!-- germanlex.jar -->
    <!-- As this is only a dummy at the moment, it is not added -->
    <!-- to the general jars target -->
    <property name="germanlex_jar" value="${lib_dir}/germanlex.jar" />

    <target name="germanlex_jar"
            depends="germanlex_db"
            description="Create ${lib_dir}/germanlex.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${germanlex_jar}"
             manifest="${src_dir}/de/dfki/lt/freetts/de/germanlex.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="de/dfki/lt/freetts/de/germanlex_*.bin" />
        </jar>
    </target>


    <!-- cmu_us_kal.jar -->
    <property name="cmu_us_kal_jar" value="${lib_dir}/cmu_us_kal.jar" />

    <target name="cmu_us_kal_jar"
            depends="compile_voices"
            description="Create ${lib_dir}/cmu_us_kal.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${cmu_us_kal_jar}"
             manifest="${src_dir}/com/sun/speech/freetts/en/us/cmu_us_kal/voice.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="com/sun/speech/freetts/en/us/cmu_us_kal/*" />
        </jar>
    </target>


    <!-- cmu_time_awb.jar -->
    <property name="cmu_time_awb_jar" value="${lib_dir}/cmu_time_awb.jar" />

    <target name="cmu_time_awb_jar"
            depends="compile_voices"
            description="Create ${lib_dir}/cmu_time_awb.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${cmu_time_awb_jar}"
             manifest="${src_dir}/com/sun/speech/freetts/en/us/cmu_time_awb/voice.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="com/sun/speech/freetts/en/us/cmu_time_awb/*" />
        </jar>
    </target>


    <!-- arctic voice -->
    <target name="arctic_voice_jar"
            depends="compile"
            if="arctic_voice"
            description="Create ${lib_dir}/${arctic_voice}.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${lib_dir}/${arctic_voice}.jar"
             manifest="${src_dir}/com/sun/speech/freetts/en/us/${arctic_voice}/voice.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}"
                     includes="com/sun/speech/freetts/en/us/${arctic_voice}/*" />
            <fileset dir="${src_dir}"
                     includes="com/sun/speech/freetts/en/us/${arctic_voice}/*.txt" />
        </jar>
    </target>

    <!-- user voice -->
    <target name="user_voice_jar"
            depends="compile_voices"
            if="user_voice"
            description="Create ${lib_dir}/${user_voice}.jar">
        <mkdir dir="${lib_dir}" />
        <jar destfile="${lib_dir}/${user_voice}.jar"
             manifest="${src_dir}/${user_voice_path}/voice.Manifest"
             filesonly="true"
             compress="true">
            <fileset dir="${classes_dir}" includes="${user_voice_path}/*" />
        </jar>
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Generates the javadoc                                  * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <property name="javadoc_desc" value="FreeTTS 1.2" />
    <property name="javadoc_pkgs"
              value="com.sun.speech.engine,
	             com.sun.speech.engine.synthesis,
	             com.sun.speech.engine.synthesis.text,
	             com.sun.speech.freetts,
	             com.sun.speech.freetts.jsapi,
	             com.sun.speech.freetts.en,
	             com.sun.speech.freetts.en.us,
 	             com.sun.speech.freetts.audio,
	             com.sun.speech.freetts.cart,
	             com.sun.speech.freetts.clunits,
	             com.sun.speech.freetts.diphone,
	             com.sun.speech.freetts.lexicon,
	             com.sun.speech.freetts.relp,
	             com.sun.speech.freetts.util,
	             de.dfki.lt.freetts.mbrola,
	             de.dfki.lt.freetts.en.us" />

    <target name="javadoc" description="Generate javadoc">
        <mkdir dir="${javadoc_dir}" />
        <javadoc sourcepath="${src_dir}"
                 source="1.4"
                 additionalparam="-breakiterator"
                 destdir="${javadoc_dir}"
                 packagenames="${javadoc_pkgs}"
                 overview="overview.html"
                 windowtitle="${javadoc_desc}"
                 doctitle="${javadoc_desc}"
                 access="protected">
            <classpath refid="libs" />
        </javadoc>
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Builds just the demos.                                 * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="demos"
            depends="freetts_jar"
            description="Compiles and jars the demos">
        <ant antfile="demo.xml" inheritall="false" />
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Convenience for emacspeak-server.                      * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="emacspeak-server" depends="compile,jars" description="">
        <ant antfile="demo.xml" target="emacspeak-server" />
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Runs the unit tests.                                   * -->
    <!-- *                                                        * -->
    <!-- * This will execute AllTests.java from the test          * -->
    <!-- * directory.  You can also tell ant to run one test by   * -->
    <!-- * adding the following to the ant command line:          * -->
    <!-- *                                                        * -->
    <!-- *    -Dtestcase=<fully qualified classname>              * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <path id="test_classpath">
        <pathelement location="${lib_dir}/freetts.jar" />
        <pathelement location="${classes_dir}" />
        <pathelement location="${src_dir}" />
        <pathelement location="${junit.jar}" />
        <path refid="libs" />
    </path>
    <target name="junit" depends="jars">
        <junit dir="tests" fork="yes" printsummary="false" haltonfailure="true">
            <classpath refid="test_classpath" />
            <formatter type="plain" usefile="false" />
            <test name="${testcase}" if="testcase" />
            <batchtest unless="testcase">
                <fileset dir="${classes_dir}" includes="tests/AllTests.class" />
            </batchtest>
        </junit>
    </target>

    <!-- [[[WDW - don't know why this will not work anywhere, but
            it doesn't.]]]
    <target name="regression" depends="jars">
        <echo message="Running regression tests."/>
        <echo message="NOTE:  these will not run on Windows."/>
        <exec dir="tests" executable="regression.sh"/>
    </target>
    -->

    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Make the packages for deployment.                      * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <fileset id="srcs" dir="${src_dir}" includes="com/**,de/**" />

    <fileset id="legal"
             dir="${src_dir}"
             includes="acknowledgments.txt,
	               license.terms" />

    <fileset id="docs"
             dir="."
             includes="index.html,overview.html,README.txt,RELEASE_NOTES,
                       ANNOUNCE.txt,
                       docs/**,mbrola/*.html,
                       javadoc/**"
             excludes="docs/*.awk" />

    <fileset id="demos" dir="." includes="demo/**" />

    <fileset id="tools" dir="." includes="tools/**" />

    <fileset id="tests" dir="." includes="tests/**" />

    <fileset id="binaries"
             dir="."
             includes="lib/*.jar,bin/*.jar,mbrola/*.jar"
             excludes="lib/jsapi.jar" />

    <fileset id="jsapi_sh"
             dir="."
             includes="lib/jsapi.sh,lib/jsapi.exe,lib/README.txt" />

    <target name="deploy"
            depends="deploy_init,
	             deploy_src,
	             deploy_bin,
	             deploy_tst,
	             deploy_webstartclock"
            description="Creates *.zip files for deployment" />

    <target name="deploy_init"
            description="Copies files to the deploy staging directory."
            depends="all,javadoc">
        <mkdir dir="${deploy_dir}/freetts-${version}" />
        <copy todir="${deploy_dir}/freetts-${version}" includeEmptyDirs="false">
            <fileset dir="."
                     includes="build.xml,
		                demo.xml,
                        speech.properties,
		                lib/voices.txt" />
            <fileset refid="srcs" />
            <fileset refid="legal" />
            <fileset refid="docs" />
            <fileset refid="demos" />
            <fileset refid="tools" />
            <fileset refid="tests" />
            <fileset refid="binaries" />
            <fileset refid="jsapi_sh" />
        </copy>
    </target>

    <!-- freetts-srcs -->
    <target name="deploy_src" depends="deploy_init">
        <jar destfile="${deploy_dir}/freetts-${version}-src.zip"
             basedir="${deploy_dir}"
             filesonly="true"
             compress="true"
             includes="freetts-${version}/**"
             excludes="**/*.jar,**/tests/**" />
    </target>

    <!-- debian .. builds only what's needed for Debian packaging -->
    <target name="debian" depends="all,javadoc">
        <mkdir dir="${deploy_dir}/freetts-${version}" />
        <copy todir="${deploy_dir}/freetts-${version}" includeEmptyDirs="false">
            <fileset refid="binaries" />
	</copy>
    </target>

    <!-- freetts-bin -->
    <target name="deploy_bin" depends="deploy_init">
        <jar destfile="${deploy_dir}/freetts-${version}-bin.zip"
             basedir="${deploy_dir}"
             filesonly="true"
             compress="true"
             includes="freetts-${version}/**"
             excludes="freetts-${version}/build.xml,
	               freetts-${version}/overview.html,
                       **/tests/**,
                       freetts-${version}/de/**,
                       freetts-${version}/com/**" />
    </target>


    <!-- freetts-tests -->
    <target name="deploy_tst">
        <jar destfile="${deploy_dir}/freetts-${version}-tst.zip"
             basedir="${deploy_dir}"
             filesonly="true"
             compress="true"
             includes="freetts-${version}/acknowledgments.txt,
                       freetts-${version}/license.terms,
                       freetts-${version}/tests/**" />
    </target>


    <!-- webstartclock -->
    <target name="deploy_webstartclock"
            depends="demos"
            description="Signs jars and creates tarball for web start demo">
        <ant antfile="demo.xml" target="deploy_webstartclock" />
    </target>


    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * Make a tarball containing things free of JSAPI         * -->
    <!-- * dependencies.  Also omits the tests.                   * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    <target name="freetts_only_tarball"
            depends="set_patternset_to_compile"
            description="Create a tarball of sources free of JSAPI dependencies.">
        <delete dir="${deploy_dir}/freetts-only-${version}" />
        <mkdir dir="${deploy_dir}/freetts-only-${version}" />
        <copy todir="${deploy_dir}/freetts-only-${version}"
              includeEmptyDirs="false">
            <fileset dir="."
                     includes="build.xml,
                                demo.xml,
		                overview.html,
                                ANNOUNCE.txt,
                                README.txt,
		                RELEASE_NOTES,
		                acknowledgments.txt,
		                license.terms,
		                lib/voices.txt,
                                docs/**,
                                mbrola/*.html,
                                demo/**,
                                tools/**"
                     excludes="demo/JSAPI/**,
                                docs/*.awk" />
            <fileset dir=".">
                <patternset refid="${patternset_to_compile}" />
            </fileset>
        </copy>
        <copy file="docs/emacspeak_index.html"
              tofile="${deploy_dir}/freetts-only-${version}/index.html" />
        <tar destfile="${deploy_dir}/freetts-only-${version}.tar.gz"
             basedir="${deploy_dir}"
             includes="freetts-only-${version}/**"
             compression="gzip" />
    </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="**/*~" />
            <fileset defaultexcludes="no"
                     dir="lib"
                     includes="**/*.jar"
                     excludes="**/jsapi.jar" />
            <fileset defaultexcludes="no"
                     dir="mbrola"
                     includes="**/mbrola.jar" />
        </delete>
        <delete dir="${bin_dir}" />
        <delete dir="${build_dir}" />
        <delete dir="${javadoc_dir}" />
        <delete dir="${deploy_dir}" />
    </target>

    <target name="debug"
            depends="all"
            if="netbeans.home"
            description="Debug Project">
        <java fork="true" classname="FreeTTSHelloWorld">
            <jvmarg value="-Xdebug" />
            <jvmarg value="-Xnoagent" />
            <jvmarg value="-Djava.compiler=none" />
            <jvmarg value="-Dfreetts.voices=com.sun.speech.freetts.en.us.cmu_us_kal.KevinVoiceDirectory" />
            <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y" />
            <classpath>
                <pathelement path="${src_dir}" />
                <pathelement path="bld/demo_classes/freetts/HelloWorld" />
                <pathelement path="${classes_dir}" />
                <pathelement location="lib/jsapi.jar" />
            </classpath>
        </java>
    </target>

</project>