Debian Codegraph @

tools/get_voices

raw
1 #!/bin/sh
2 ###########################################################################
3 ## ##
4 ## Language Technologies Institute ##
5 ## Carnegie Mellon University ##
6 ## Copyright (c) 2017 ##
7 ## All Rights Reserved. ##
8 ## ##
9 ## Permission is hereby granted, free of charge, to use and distribute ##
10 ## this software and its documentation without restriction, including ##
11 ## without limitation the rights to use, copy, modify, merge, publish, ##
12 ## distribute, sublicense, and/or sell copies of this work, and to ##
13 ## permit persons to whom this work is furnished to do so, subject to ##
14 ## the following conditions: ##
15 ## 1. The code must retain the above copyright notice, this list of ##
16 ## conditions and the following disclaimer. ##
17 ## 2. Any modifications must be clearly marked as such. ##
18 ## 3. Original authors' names are not deleted. ##
19 ## 4. The authors' names are not used to endorse or promote products ##
20 ## derived from this software without specific prior written ##
21 ## permission. ##
22 ## ##
23 ## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
24 ## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
25 ## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
26 ## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
27 ## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
28 ## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
29 ## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
30 ## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
31 ## THIS SOFTWARE. ##
32 ## ##
33 ###########################################################################
34 ## Author: Alan W Black ([email protected]) ##
35 ## Date: November 2017 ##
36 ###########################################################################
37 ## ##
38 ## Download some .flitevox voices ##
39 ## ##
40 ###########################################################################
41
42 if [ ! -f include/flite.h ]
43 then
44 echo "Not in the right directory."
45 echo "You should be in the flite main src directory to run this script"
46 echo "where ls -l include/flite.h is found"
47 exit -1
48 fi
49
50 if [ ! -d voices ]
51 then
52 mkdir voices
53 fi
54
55 if [ $# = 0 ]
56 then
57 $0 us_voices
58 exit 0
59 fi
60
61 #FLITEVOICEDIR=http://tts.speech.cs.cmu.edu/awb/flite-2.1/voices/
62 #FLITEVOICEDIR=http://festvox.org/flite/packed/flite-2.1/voices/
63 FLITEVOICEDIR=http://cmuflite.org/packed/flite-2.1/voices/
64
65 if [ "$1" = "us_voices" ]
66 then
67 cd voices
68 wget $FLITEVOICEDIR/us_voices
69 for i in `grep ".flitevox$" us_voices`
70 do
71 vname=`basename $i`
72 rm -f $vname
73 wget $FLITEVOICEDIR/$vname
74 done
75 rm -f us_voices
76 exit 0
77 fi
78
79 if [ "$1" = "indic_voices" ]
80 then
81 cd voices
82 wget $FLITEVOICEDIR/indic_voices
83 for i in `grep ".flitevox$" indic_voices`
84 do
85 vname=`basename $i`
86 rm -f $vname
87 wget $FLITEVOICEDIR/$vname
88 done
89 rm -f indic_voices
90 exit 0
91 fi
92
93 if [ "$1" = "all_voices" ]
94 then
95 $0 us_voices
96 $0 indic_voices
97 exit 0
98 fi
99
100 exit
101
102
103