update standards version
[debian/freetts] / tests / lpctest.sh
1 #!/bin/sh
2 #
3 # This test script first runs the FreeTTS with our first utterance file,
4 # dumps the LPC residual in text form, and compares (diff) it with our
5 # standard LPC file for our first utterance (first.wave.txt). This test will
6 # tell you how many lines differ from the standard LPC file.
7 #
8
9 if [ -f lpctest.res ]; then
10         rm lpctest.res
11 fi
12
13 if [ -f lpctest.diff ]; then
14         rm lpctest.diff
15 fi
16
17 java -Dcom.sun.speech.freetts.outputLPC=true -jar ../lib/freetts.jar \
18     -voice kevin -silent -file wave/08-01-01.wave.text | grep -v "^#" > \
19     lpctest.res
20
21 diff lpctest.res wave/flite1.1.lpcres.txt > lpctest.diff
22
23 wc lpctest.diff | awk '
24 {
25         if ($1 == 0) {
26             printf("%s differences in lpctest.diff.  Test PASSED\n", $1);
27         } else {
28             printf("%s differences in lpctest.diff.  Test FAILED\n", $1);
29         }
30 }
31 '