summaryrefslogtreecommitdiff
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.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 () {
1111 fi 1111 fi
1112 if [ -n "`findtool festival`" ]; then 1112 if [ -n "`findtool festival`" ]; then
1113 FESTIVAL="(F)estival " 1113 FESTIVAL="(F)estival "
1114 case "$thislang" in 1114 FESTIVAL_OPTS=""
1115 "italiano")
1116 FESTIVAL_OPTS="--language italian"
1117 ;;
1118 "espanol")
1119 FESTIVAL_OPTS="--language spanish"
1120 ;;
1121 "finnish")
1122 FESTIVAL_OPTS="--language finnish"
1123 ;;
1124 "czech")
1125 FESTIVAL_OPTS="--language czech"
1126 ;;
1127 *)
1128 FESTIVAL_OPTS=""
1129 ;;
1130 esac
1131 DEFAULT_TTS="festival" 1115 DEFAULT_TTS="festival"
1132 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS 1116 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
1133 DEFAULT_NOISEFLOOR="500" 1117 DEFAULT_NOISEFLOOR="500"
@@ -1149,14 +1133,6 @@ voiceconfig () {
1149 DEFAULT_NOISEFLOOR="500" 1133 DEFAULT_NOISEFLOOR="500"
1150 DEFAULT_CHOICE="w" 1134 DEFAULT_CHOICE="w"
1151 fi 1135 fi
1152 if [ -n "`findtool rbspeak`" ]; then
1153 RBSPEAK="(O)ther "
1154 RBSPEAK_OPTS=""
1155 DEFAULT_TTS="rbspeak"
1156 DEFAULT_TTS_OPTS=$RBSPEAK_OPTS
1157 DEFAULT_NOISEFLOOR="500"
1158 DEFAULT_CHOICE="O"
1159 fi
1160 # Allow SAPI if Windows is in use 1136 # Allow SAPI if Windows is in use
1161 if [ -n "`findtool winver`" ]; then 1137 if [ -n "`findtool winver`" ]; then
1162 SAPI="(S)API " 1138 SAPI="(S)API "
@@ -1164,10 +1140,26 @@ voiceconfig () {
1164 DEFAULT_TTS="sapi" 1140 DEFAULT_TTS="sapi"
1165 DEFAULT_TTS_OPTS=$SAPI_OPTS 1141 DEFAULT_TTS_OPTS=$SAPI_OPTS
1166 DEFAULT_NOISEFLOOR="500" 1142 DEFAULT_NOISEFLOOR="500"
1167 DEFAULT_CHOICE="s" 1143 DEFAULT_CHOICE="S"
1144 fi
1145 if [ -n "`findtool gtts-cli`" ]; then
1146 GTTS="(g)tts "
1147 GTTS_OPTS=""
1148 DEFAULT_TTS="gtts"
1149 DEFAULT_TTS_OPTS=$GTTS_OPTS
1150 DEFAULT_NOISEFLOOR="500"
1151 DEFAULT_CHOICE="g"
1152 fi
1153 if [ -n "`findtool rbspeak`" ]; then
1154 RBSPEAK="(O)ther "
1155 RBSPEAK_OPTS=""
1156 DEFAULT_TTS="rbspeak"
1157 DEFAULT_TTS_OPTS=$RBSPEAK_OPTS
1158 DEFAULT_NOISEFLOOR="500"
1159 DEFAULT_CHOICE="O"
1168 fi 1160 fi
1169 1161
1170 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$MIMIC"] && [ "$MIMIC" = "$SWIFT" ] && [ "$SWIFT" = "$RBSPEAK" ]; then 1162 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$MIMIC"] && [ "$MIMIC" = "$SWIFT" ] && [ "$SWIFT" = "$RBSPEAK" ] && [ "$RBSPEAK" = "$GTTS" ] ; then
1171 echo "You need Festival, eSpeak, Mimic, Flite, or rbspeak in your path, or SAPI available to build voice files" 1163 echo "You need Festival, eSpeak, Mimic, Flite, or rbspeak in your path, or SAPI available to build voice files"
1172 exit 3 1164 exit 3
1173 fi 1165 fi
@@ -1175,7 +1167,7 @@ voiceconfig () {
1175 if [ "$ARG_TTS" ]; then 1167 if [ "$ARG_TTS" ]; then
1176 option=$ARG_TTS 1168 option=$ARG_TTS
1177 else 1169 else
1178 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${MIMIC}${SAPI}${SWIFT}${RBSPEAK}(${DEFAULT_CHOICE})?" 1170 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${MIMIC}${SAPI}${SWIFT}${GTTS}${RBSPEAK}(${DEFAULT_CHOICE})?"
1179 option=`input` 1171 option=`input`
1180 if [ -z "$option" ]; then option=${DEFAULT_CHOICE}; fi 1172 if [ -z "$option" ]; then option=${DEFAULT_CHOICE}; fi
1181 advopts="$advopts --tts=$option" 1173 advopts="$advopts --tts=$option"
@@ -1211,6 +1203,11 @@ voiceconfig () {
1211 NOISEFLOOR="500" 1203 NOISEFLOOR="500"
1212 TTS_OPTS=$SWIFT_OPTS 1204 TTS_OPTS=$SWIFT_OPTS
1213 ;; 1205 ;;
1206 [Gg)
1207 TTS_ENGINE="gtts"
1208 NOISEFLOOR="500"
1209 TTS_OPTS=$GTTS_OPTS
1210 ;;
1214 [Oo]) 1211 [Oo])
1215 TTS_ENGINE="rbspeak" 1212 TTS_ENGINE="rbspeak"
1216 NOISEFLOOR="500" 1213 NOISEFLOOR="500"