update standards version
[debian/freetts] / tests / waveTimeTest.sh
1 #!/bin/sh
2 # Copyright (c) 2001-2003 Sun Microsystems, Inc.
3 # All Rights Reserved.
4
5 # See the file "license.terms" for information on usage and
6 # redistribution of this file, and for a DISCLAIMER OF ALL 
7 # WARRANTIES.
8 #
9 # This test script first runs the FreeTTS with our first utterance file,
10 # dumps the wave in text form, and compares (diff) it with our standard 
11 # wave form file for our first utterance (first.wave.txt). This test will
12 # tell you how many lines differ from the standard wave form file.
13 #
14 # (Reminder: our 'first utterance file' is "Hello world.  This is Duke 
15 # coming to you from inside the java virtual machine. I'm happy to have
16 # a voice because I've been meaning to tell you how much I care.")
17 #
18
19 # Input: input_time flite_utterence_file
20
21 if [ -f utteranceTest.res ]; then
22         rm utteranceTest.res
23 fi
24
25 if [ -f utteranceTest.diff ]; then
26         rm utteranceTest.diff
27 fi
28
29 rm -f timeTest.wave
30 java -cp ../lib/freetts.jar com.sun.speech.freetts.FreeTTSTime \
31     -dumpASCII timeTest.wave -silent -time $1
32
33 diff -b $2 timeTest.wave | wc | awk '
34 {
35         if ($1 == 0) {
36             printf("%s differences in timeTest.wave.  Test PASSED\n", $1);
37         } else {
38             printf("%s differences in timeTest.wave.  Test FAILED\n", $1);
39         }
40 }
41 '