From 005699f98b0a49b489947f58a042f6ba62ce761d Mon Sep 17 00:00:00 2001 From: Jonas Häggqvist Date: Sat, 1 Sep 2007 20:03:20 +0000 Subject: Add support for building voices with the swift engine from cepstral.com. Patch FS#7689 by Mario Lang. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14565 a1c6a512-1295-4272-9138-f99709370657 --- docs/CREDITS | 1 + tools/configure | 17 +++++++++++++++-- tools/voice.pl | 5 +++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/CREDITS b/docs/CREDITS index 19ea43145e..b08ab1ad34 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -321,6 +321,7 @@ Daniel Dalton Boris Gjenero Sylvain Fourmanoit Alex Parker +Mario Lang The libmad team The wavpack team The ffmpeg team diff --git a/tools/configure b/tools/configure index 6be536e109..c62f7d0571 100755 --- a/tools/configure +++ b/tools/configure @@ -368,6 +368,14 @@ voiceconfig () { DEFAULT_NOISEFLOOR="500" DEFAULT_CHOICE="F" fi + if [ -f "`which swift`" ]; then + SWIFT="S(w)ift " + SWIFT_OPTS="" + DEFAULT_TTS="swift" + DEFAULT_TTS_OPTS=$SWIFT_OPTS + DEFAULT_NOISEFLOOR="500" + DEFAULT_CHOICE="w" + fi # Allow SAPI if Windows is in use if [ -f "`which winver`" ]; then SAPI5="(S)API5 " @@ -378,12 +386,12 @@ voiceconfig () { DEFAULT_CHOICE="S" fi - if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI5" ]; then + if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI5" ] && [ "$SAPI5" = "$SWIFT" ]; then echo "You need Festival, eSpeak or Flite in your path, or SAPI5 available to build voice files" exit fi - echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI5}(${DEFAULT_CHOICE})?" + echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI5}${SWIFT}(${DEFAULT_CHOICE})?" option=`input` case "$option" in [Ll]) @@ -406,6 +414,11 @@ voiceconfig () { NOISEFLOOR="500" TTS_OPTS=$SAPI5_OPTS ;; + [Ww]) + TTS_ENGINE="swift" + NOISEFLOOR="500" + TTS_OPTS=$SWIFT_OPTS + ;; *) TTS_ENGINE=$DEFAULT_TTS 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 { case "sapi5" { print({$$tts_object{"stdin"}} sprintf("SPEAK\t%s\t%s\r\n", $output, $string)); } + case "swift" { + $cmd = "swift $tts_engine_opts -o $output \"$string\""; + print("> $cmd\n") if $verbose; + system($cmd); + } } } -- cgit v1.2.3