summaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-08 19:05:09 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-08 23:16:57 +0000
commit2c3399537cfb9d481a1e31a4b625d2abb97664e2 (patch)
tree2a612cfd81ee1766e9b2e61801f231911d577137 /tools/configure
parent5e98eba8abc16d494802ed41f37ef7cec54dc8f4 (diff)
downloadrockbox-2c3399537cfb9d481a1e31a4b625d2abb97664e2.tar.gz
rockbox-2c3399537cfb9d481a1e31a4b625d2abb97664e2.tar.bz2
rockbox-2c3399537cfb9d481a1e31a4b625d2abb97664e2.zip
voice: Add support for Google Translate's speech synthesizer
Uses the 'gtts-cli' command line client. Supports a wide variety of languages, including all "Complete" and "Good" Rockbox translations. Additional changes: * voice synth script can accept pre-encoded mp3 files * Move language->synth options mapping into the voice script * Additional cleanups Change-Id: I9523e2bca87cbcee2d8c4111f9892e8e458c7419
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure53
1 files changed, 25 insertions, 28 deletions
diff --git a/tools/configure b/tools/configure
index 585eadd357..aa8b190250 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1111,23 +1111,7 @@ voiceconfig () {
fi
if [ -n "`findtool festival`" ]; then
FESTIVAL="(F)estival "
- case "$thislang" in
- "italiano")
- FESTIVAL_OPTS="--language italian"
- ;;
- "espanol")
- FESTIVAL_OPTS="--language spanish"
- ;;
- "finnish")
- FESTIVAL_OPTS="--language finnish"
- ;;
- "czech")
- FESTIVAL_OPTS="--language czech"
- ;;
- *)
- FESTIVAL_OPTS=""
- ;;
- esac
+ FESTIVAL_OPTS=""
DEFAULT_TTS="festival"
DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
DEFAULT_NOISEFLOOR="500"
@@ -1149,14 +1133,6 @@ voiceconfig () {
DEFAULT_NOISEFLOOR="500"
DEFAULT_CHOICE="w"
fi
- if [ -n "`findtool rbspeak`" ]; then
- RBSPEAK="(O)ther "
- RBSPEAK_OPTS=""
- DEFAULT_TTS="rbspeak"
- DEFAULT_TTS_OPTS=$RBSPEAK_OPTS
- DEFAULT_NOISEFLOOR="500"
- DEFAULT_CHOICE="O"
- fi
# Allow SAPI if Windows is in use
if [ -n "`findtool winver`" ]; then
SAPI="(S)API "
@@ -1164,10 +1140,26 @@ voiceconfig () {
DEFAULT_TTS="sapi"
DEFAULT_TTS_OPTS=$SAPI_OPTS
DEFAULT_NOISEFLOOR="500"
- DEFAULT_CHOICE="s"
+ DEFAULT_CHOICE="S"
+ fi
+ if [ -n "`findtool gtts-cli`" ]; then
+ GTTS="(g)tts "
+ GTTS_OPTS=""
+ DEFAULT_TTS="gtts"
+ DEFAULT_TTS_OPTS=$GTTS_OPTS
+ DEFAULT_NOISEFLOOR="500"
+ DEFAULT_CHOICE="g"
+ fi
+ if [ -n "`findtool rbspeak`" ]; then
+ RBSPEAK="(O)ther "
+ RBSPEAK_OPTS=""
+ DEFAULT_TTS="rbspeak"
+ DEFAULT_TTS_OPTS=$RBSPEAK_OPTS
+ DEFAULT_NOISEFLOOR="500"
+ DEFAULT_CHOICE="O"
fi
- if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$MIMIC"] && [ "$MIMIC" = "$SWIFT" ] && [ "$SWIFT" = "$RBSPEAK" ]; then
+ if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$MIMIC"] && [ "$MIMIC" = "$SWIFT" ] && [ "$SWIFT" = "$RBSPEAK" ] && [ "$RBSPEAK" = "$GTTS" ] ; then
echo "You need Festival, eSpeak, Mimic, Flite, or rbspeak in your path, or SAPI available to build voice files"
exit 3
fi
@@ -1175,7 +1167,7 @@ voiceconfig () {
if [ "$ARG_TTS" ]; then
option=$ARG_TTS
else
- echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${MIMIC}${SAPI}${SWIFT}${RBSPEAK}(${DEFAULT_CHOICE})?"
+ echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${MIMIC}${SAPI}${SWIFT}${GTTS}${RBSPEAK}(${DEFAULT_CHOICE})?"
option=`input`
if [ -z "$option" ]; then option=${DEFAULT_CHOICE}; fi
advopts="$advopts --tts=$option"
@@ -1211,6 +1203,11 @@ voiceconfig () {
NOISEFLOOR="500"
TTS_OPTS=$SWIFT_OPTS
;;
+ [Gg)
+ TTS_ENGINE="gtts"
+ NOISEFLOOR="500"
+ TTS_OPTS=$GTTS_OPTS
+ ;;
[Oo])
TTS_ENGINE="rbspeak"
NOISEFLOOR="500"