summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure17
-rwxr-xr-xtools/voice.pl5
2 files changed, 20 insertions, 2 deletions
diff --git a/tools/configure b/tools/configure
index 6be536e109..c62f7d0571 100755
--- a/tools/configure
+++ b/tools/configure
@@ -368,6 +368,14 @@ voiceconfig () {
368 DEFAULT_NOISEFLOOR="500" 368 DEFAULT_NOISEFLOOR="500"
369 DEFAULT_CHOICE="F" 369 DEFAULT_CHOICE="F"
370 fi 370 fi
371 if [ -f "`which swift`" ]; then
372 SWIFT="S(w)ift "
373 SWIFT_OPTS=""
374 DEFAULT_TTS="swift"
375 DEFAULT_TTS_OPTS=$SWIFT_OPTS
376 DEFAULT_NOISEFLOOR="500"
377 DEFAULT_CHOICE="w"
378 fi
371 # Allow SAPI if Windows is in use 379 # Allow SAPI if Windows is in use
372 if [ -f "`which winver`" ]; then 380 if [ -f "`which winver`" ]; then
373 SAPI5="(S)API5 " 381 SAPI5="(S)API5 "
@@ -378,12 +386,12 @@ voiceconfig () {
378 DEFAULT_CHOICE="S" 386 DEFAULT_CHOICE="S"
379 fi 387 fi
380 388
381 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI5" ]; then 389 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI5" ] && [ "$SAPI5" = "$SWIFT" ]; then
382 echo "You need Festival, eSpeak or Flite in your path, or SAPI5 available to build voice files" 390 echo "You need Festival, eSpeak or Flite in your path, or SAPI5 available to build voice files"
383 exit 391 exit
384 fi 392 fi
385 393
386 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI5}(${DEFAULT_CHOICE})?" 394 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI5}${SWIFT}(${DEFAULT_CHOICE})?"
387 option=`input` 395 option=`input`
388 case "$option" in 396 case "$option" in
389 [Ll]) 397 [Ll])
@@ -406,6 +414,11 @@ voiceconfig () {
406 NOISEFLOOR="500" 414 NOISEFLOOR="500"
407 TTS_OPTS=$SAPI5_OPTS 415 TTS_OPTS=$SAPI5_OPTS
408 ;; 416 ;;
417 [Ww])
418 TTS_ENGINE="swift"
419 NOISEFLOOR="500"
420 TTS_OPTS=$SWIFT_OPTS
421 ;;
409 *) 422 *)
410 TTS_ENGINE=$DEFAULT_TTS 423 TTS_ENGINE=$DEFAULT_TTS
411 TTS_OPTS=$DEFAULT_TTS_OPTS 424 TTS_OPTS=$DEFAULT_TTS_OPTS
diff --git a/tools/voice.pl b/tools/voice.pl
index 88f3ba4744..85ff6642f4 100755
--- a/tools/voice.pl
+++ b/tools/voice.pl
@@ -184,6 +184,11 @@ sub voicestring {
184 case "sapi5" { 184 case "sapi5" {
185 print({$$tts_object{"stdin"}} sprintf("SPEAK\t%s\t%s\r\n", $output, $string)); 185 print({$$tts_object{"stdin"}} sprintf("SPEAK\t%s\t%s\r\n", $output, $string));
186 } 186 }
187 case "swift" {
188 $cmd = "swift $tts_engine_opts -o $output \"$string\"";
189 print("> $cmd\n") if $verbose;
190 system($cmd);
191 }
187 } 192 }
188} 193}
189 194