diff options
author | Steve Bavin <pondlife@pondlife.me> | 2007-08-09 12:07:42 +0000 |
---|---|---|
committer | Steve Bavin <pondlife@pondlife.me> | 2007-08-09 12:07:42 +0000 |
commit | 6bc7da7c1f686096efe1fdd44c53fff59f60c96f (patch) | |
tree | 2e595baa94d02c22981060acd0c4514fc1d2cd0e /tools/configure | |
parent | c8c80a5391d028e0ee40432568f0a40eb623b249 (diff) |
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-x | tools/configure | 28 |
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 () { 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 <<EOF TTS_ENGINE="${TTS_ENGINE}" ENCODER="${ENCODER}" -TEMPDIR="${pwd}" +TEMPDIR="$TEMPDIR" NOISEFLOOR="${NOISEFLOOR}" ${TTS_OPTS} ${ENC_OPTS} |