forked from len0rd/rockbox
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
This commit is contained in:
parent
c8c80a5391
commit
6bc7da7c1f
5 changed files with 157 additions and 7 deletions
28
tools/configure
vendored
28
tools/configure
vendored
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue