1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Jonas Häggqvist 2007-09-01 20:03:20 +00:00
parent 499d27d7d1
commit 005699f98b
3 changed files with 21 additions and 2 deletions

View file

@ -321,6 +321,7 @@ Daniel Dalton
Boris Gjenero Boris Gjenero
Sylvain Fourmanoit Sylvain Fourmanoit
Alex Parker Alex Parker
Mario Lang
The libmad team The libmad team
The wavpack team The wavpack team
The ffmpeg team The ffmpeg team

17
tools/configure vendored
View file

@ -368,6 +368,14 @@ voiceconfig () {
DEFAULT_NOISEFLOOR="500" DEFAULT_NOISEFLOOR="500"
DEFAULT_CHOICE="F" DEFAULT_CHOICE="F"
fi 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 # Allow SAPI if Windows is in use
if [ -f "`which winver`" ]; then if [ -f "`which winver`" ]; then
SAPI5="(S)API5 " SAPI5="(S)API5 "
@ -378,12 +386,12 @@ voiceconfig () {
DEFAULT_CHOICE="S" DEFAULT_CHOICE="S"
fi 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" echo "You need Festival, eSpeak or Flite in your path, or SAPI5 available to build voice files"
exit exit
fi 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` option=`input`
case "$option" in case "$option" in
[Ll]) [Ll])
@ -406,6 +414,11 @@ voiceconfig () {
NOISEFLOOR="500" NOISEFLOOR="500"
TTS_OPTS=$SAPI5_OPTS TTS_OPTS=$SAPI5_OPTS
;; ;;
[Ww])
TTS_ENGINE="swift"
NOISEFLOOR="500"
TTS_OPTS=$SWIFT_OPTS
;;
*) *)
TTS_ENGINE=$DEFAULT_TTS TTS_ENGINE=$DEFAULT_TTS
TTS_OPTS=$DEFAULT_TTS_OPTS TTS_OPTS=$DEFAULT_TTS_OPTS

View file

@ -184,6 +184,11 @@ sub voicestring {
case "sapi5" { case "sapi5" {
print({$$tts_object{"stdin"}} sprintf("SPEAK\t%s\t%s\r\n", $output, $string)); 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);
}
} }
} }