From 6bc7da7c1f686096efe1fdd44c53fff59f60c96f Mon Sep 17 00:00:00 2001 From: Steve Bavin Date: Thu, 9 Aug 2007 12:07:42 +0000 Subject: 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 --- tools/configure | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'tools/configure') diff --git a/tools/configure b/tools/configure index b2d2be2508..e01230c390 100755 --- a/tools/configure +++ b/tools/configure @@ -326,19 +326,28 @@ voiceconfig () { fi if [ `which festival` ]; then FESTIVAL="(F)estival " - FESTIVAL_OPTS="FLITE_OPTS=\"\"" + FESTIVAL_OPTS="FESTIVAL_OPTS=\"\"" DEFAULT_TTS="festival" DEFAULT_TTS_OPTS=$FESTIVAL_OPTS DEFAULT_NOISEFLOOR="500" DEFAULT_CHOICE="F" fi + # Allow SAPI if Windows is in use + if [ `which winver` ]; then + SAPI5="(S)API5 " + SAPI5_OPTS="SAPI5_OPTS=\"\"" + DEFAULT_TTS="sapi5" + DEFAULT_TTS_OPTS=$SAPI5_OPTS + DEFAULT_NOISEFLOOR="500" + DEFAULT_CHOICE="S" + fi - if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ]; then - echo "You need Festival, eSpeak or Flite in your path to build voice files" + if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI5" ]; 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}(${DEFAULT_CHOICE})?" + echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI5}(${DEFAULT_CHOICE})?" option=`input` case "$option" in [Ll]) @@ -356,6 +365,11 @@ voiceconfig () { NOISEFLOOR="500" TTS_OPTS=$FESTIVAL_OPTS ;; + [Ss]) + TTS_ENGINE="sapi5" + NOISEFLOOR="500" + TTS_OPTS=$SAPI5_OPTS + ;; *) TTS_ENGINE=$DEFAULT_TTS TTS_OPTS=$DEFAULT_TTS_OPTS @@ -413,11 +427,15 @@ voiceconfig () { # ENC_OPTS=$DEFAULT_ENC_OPTS # esac echo "Using $ENCODER for encoding voice clips" + TEMPDIR="${pwd}" + if [ `which cygpath` ]; then + TEMPDIR=`cygpath . -a -w` + fi cat > voicesettings.sh <