summaryrefslogtreecommitdiff
path: root/tools/configure
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2007-08-09 12:07:42 +0000
committerSteve Bavin <pondlife@pondlife.me>2007-08-09 12:07:42 +0000
commit6bc7da7c1f686096efe1fdd44c53fff59f60c96f (patch)
tree2e595baa94d02c22981060acd0c4514fc1d2cd0e /tools/configure
parentc8c80a5391d028e0ee40432568f0a40eb623b249 (diff)
downloadrockbox-6bc7da7c1f686096efe1fdd44c53fff59f60c96f.tar.gz
rockbox-6bc7da7c1f686096efe1fdd44c53fff59f60c96f.zip
Allow Cygwin users to generate voice files using SAPI 5. Slow, and missing some of the details from the old MakeVoices.vbs method, but better than nothing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14252 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure28
1 files changed, 23 insertions, 5 deletions
diff --git a/tools/configure b/tools/configure
index b2d2be2508..e01230c390 100755
--- a/tools/configure
+++ b/tools/configure
@@ -326,19 +326,28 @@ voiceconfig () {
326 fi 326 fi
327 if [ `which festival` ]; then 327 if [ `which festival` ]; then
328 FESTIVAL="(F)estival " 328 FESTIVAL="(F)estival "
329 FESTIVAL_OPTS="FLITE_OPTS=\"\"" 329 FESTIVAL_OPTS="FESTIVAL_OPTS=\"\""
330 DEFAULT_TTS="festival" 330 DEFAULT_TTS="festival"
331 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS 331 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
332 DEFAULT_NOISEFLOOR="500" 332 DEFAULT_NOISEFLOOR="500"
333 DEFAULT_CHOICE="F" 333 DEFAULT_CHOICE="F"
334 fi 334 fi
335 # Allow SAPI if Windows is in use
336 if [ `which winver` ]; then
337 SAPI5="(S)API5 "
338 SAPI5_OPTS="SAPI5_OPTS=\"\""
339 DEFAULT_TTS="sapi5"
340 DEFAULT_TTS_OPTS=$SAPI5_OPTS
341 DEFAULT_NOISEFLOOR="500"
342 DEFAULT_CHOICE="S"
343 fi
335 344
336 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ]; then 345 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI5" ]; then
337 echo "You need Festival, eSpeak or Flite in your path to build voice files" 346 echo "You need Festival, eSpeak or Flite in your path, or SAPI5 available to build voice files"
338 exit 347 exit
339 fi 348 fi
340 349
341 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}(${DEFAULT_CHOICE})?" 350 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI5}(${DEFAULT_CHOICE})?"
342 option=`input` 351 option=`input`
343 case "$option" in 352 case "$option" in
344 [Ll]) 353 [Ll])
@@ -356,6 +365,11 @@ voiceconfig () {
356 NOISEFLOOR="500" 365 NOISEFLOOR="500"
357 TTS_OPTS=$FESTIVAL_OPTS 366 TTS_OPTS=$FESTIVAL_OPTS
358 ;; 367 ;;
368 [Ss])
369 TTS_ENGINE="sapi5"
370 NOISEFLOOR="500"
371 TTS_OPTS=$SAPI5_OPTS
372 ;;
359 *) 373 *)
360 TTS_ENGINE=$DEFAULT_TTS 374 TTS_ENGINE=$DEFAULT_TTS
361 TTS_OPTS=$DEFAULT_TTS_OPTS 375 TTS_OPTS=$DEFAULT_TTS_OPTS
@@ -413,11 +427,15 @@ voiceconfig () {
413# ENC_OPTS=$DEFAULT_ENC_OPTS 427# ENC_OPTS=$DEFAULT_ENC_OPTS
414# esac 428# esac
415 echo "Using $ENCODER for encoding voice clips" 429 echo "Using $ENCODER for encoding voice clips"
430 TEMPDIR="${pwd}"
431 if [ `which cygpath` ]; then
432 TEMPDIR=`cygpath . -a -w`
433 fi
416 434
417 cat > voicesettings.sh <<EOF 435 cat > voicesettings.sh <<EOF
418TTS_ENGINE="${TTS_ENGINE}" 436TTS_ENGINE="${TTS_ENGINE}"
419ENCODER="${ENCODER}" 437ENCODER="${ENCODER}"
420TEMPDIR="${pwd}" 438TEMPDIR="$TEMPDIR"
421NOISEFLOOR="${NOISEFLOOR}" 439NOISEFLOOR="${NOISEFLOOR}"
422${TTS_OPTS} 440${TTS_OPTS}
423${ENC_OPTS} 441${ENC_OPTS}