diff options
Diffstat (limited to 'tools/voicecommon.sh')
-rw-r--r-- | tools/voicecommon.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/voicecommon.sh b/tools/voicecommon.sh index 138ff59a9e..e18308ee4e 100644 --- a/tools/voicecommon.sh +++ b/tools/voicecommon.sh | |||
@@ -53,7 +53,9 @@ TOOLSDIR=`dirname $0` | |||
53 | WAVTRIM=$TOOLSDIR/wavtrim | 53 | WAVTRIM=$TOOLSDIR/wavtrim |
54 | 54 | ||
55 | # The SAPI5 script directory | 55 | # The SAPI5 script directory |
56 | SAPI5DIR=`cygpath $TOOLSDIR -a -w` | 56 | if [ "`which cygpath`" != "" ]; then |
57 | SAPI5DIR=`cygpath $TOOLSDIR -a -w` | ||
58 | fi | ||
57 | 59 | ||
58 | ##################### | 60 | ##################### |
59 | # Festival settings # | 61 | # Festival settings # |
@@ -126,14 +128,14 @@ init_tts() { | |||
126 | case $TTS_ENGINE in | 128 | case $TTS_ENGINE in |
127 | festival) | 129 | festival) |
128 | # Check for festival_client | 130 | # Check for festival_client |
129 | if [ ! `which $FESTIVAL_CLIENT` ]; then | 131 | if [ "`which $FESTIVAL_CLIENT`" = "" ]; then |
130 | echo "Error: $FESTIVAL_CLIENT not found" | 132 | echo "Error: $FESTIVAL_CLIENT not found" |
131 | exit 4 | 133 | exit 4 |
132 | fi | 134 | fi |
133 | 135 | ||
134 | # Check for, and start festival server if specified | 136 | # Check for, and start festival server if specified |
135 | if [ X$FESTIVAL_START = XY ]; then | 137 | if [ X$FESTIVAL_START = XY ]; then |
136 | if [ ! `which $FESTIVAL_BIN` ]; then | 138 | if [ "`which $FESTIVAL_BIN`" = "" ]; then |
137 | echo "Error: $FESTIVAL_BIN not found" | 139 | echo "Error: $FESTIVAL_BIN not found" |
138 | exit 3 | 140 | exit 3 |
139 | fi | 141 | fi |
@@ -158,14 +160,14 @@ init_tts() { | |||
158 | ;; | 160 | ;; |
159 | flite) | 161 | flite) |
160 | # Check for flite | 162 | # Check for flite |
161 | if [ ! `which $FLITE_BIN` ]; then | 163 | if [ "`which $FLITE_BIN`" = "" ]; then |
162 | echo "Error: $FLITE_BIN not found" | 164 | echo "Error: $FLITE_BIN not found" |
163 | exit 5 | 165 | exit 5 |
164 | fi | 166 | fi |
165 | ;; | 167 | ;; |
166 | espeak) | 168 | espeak) |
167 | # Check for espeak | 169 | # Check for espeak |
168 | if [ ! `which $ESPEAK_BIN` ]; then | 170 | if [ "`which $ESPEAK_BIN`" = "" ]; then |
169 | echo "Error: $ESPEAK_BIN not found" | 171 | echo "Error: $ESPEAK_BIN not found" |
170 | exit 5 | 172 | exit 5 |
171 | fi | 173 | fi |
@@ -206,21 +208,21 @@ init_encoder() { | |||
206 | case $ENCODER in | 208 | case $ENCODER in |
207 | lame) | 209 | lame) |
208 | # Check for lame binary | 210 | # Check for lame binary |
209 | if [ ! `which $LAME_BIN` ]; then | 211 | if [ "" = "`which $LAME_BIN`" ]; then |
210 | echo "Error: $LAME_BIN not found" | 212 | echo "Error: $LAME_BIN not found" |
211 | exit 6 | 213 | exit 6 |
212 | fi | 214 | fi |
213 | ;; | 215 | ;; |
214 | speex) | 216 | speex) |
215 | # Check for speexenc binary | 217 | # Check for speexenc binary |
216 | if [ ! `which $SPEEX_BIN` ]; then | 218 | if [ "" = "`which $SPEEX_BIN`" ]; then |
217 | echo "Error: $SPEEX_BIN not found" | 219 | echo "Error: $SPEEX_BIN not found" |
218 | exit 7 | 220 | exit 7 |
219 | fi | 221 | fi |
220 | ;; | 222 | ;; |
221 | vorbis) | 223 | vorbis) |
222 | # Check for vorbis encoder binary | 224 | # Check for vorbis encoder binary |
223 | if [ ! `which $VORBIS_BIN` ]; then | 225 | if [ "" = "`which $VORBIS_BIN`" ]; then |
224 | echo "Error: $VORBIS_BIN not found" | 226 | echo "Error: $VORBIS_BIN not found" |
225 | exit 10 | 227 | exit 10 |
226 | fi | 228 | fi |