summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-10 19:49:35 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-11 00:09:49 +0000
commit938d82035530dde86ff607f4fe99194f1efe6c90 (patch)
tree981cbe229ada2389d3d7a677074f2a1d27180c6d
parent711bff47b74641c888de59c269ed76e99f16a239 (diff)
downloadrockbox-938d82035530dde86ff607f4fe99194f1efe6c90.tar.gz
rockbox-938d82035530dde86ff607f4fe99194f1efe6c90.tar.bz2
rockbox-938d82035530dde86ff607f4fe99194f1efe6c90.zip
voices: Add tts language mappings for the top 19 languages
festival: english and spanish only gtts: all but nederlands espeak: all (need espeak-ng for czech, greek, and japanese) Change-Id: I7df1b3235b48f352b0af3c13e3742e85432bc692
-rwxr-xr-xtools/configure8
-rwxr-xr-xtools/voice.pl29
2 files changed, 29 insertions, 8 deletions
diff --git a/tools/configure b/tools/configure
index aa8b190250..9069c84e3b 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1109,6 +1109,14 @@ voiceconfig () {
DEFAULT_NOISEFLOOR="500"
DEFAULT_CHOICE="e"
fi
+ if [ -n "`findtool espeak-ng`" ]; then
+ ESPEAK="(e)Speak-ng "
+ ESPEAK_OPTS=""
+ DEFAULT_TTS="espeak-ng"
+ DEFAULT_TTS_OPTS=$ESPEAK_OPTS
+ DEFAULT_NOISEFLOOR="500"
+ DEFAULT_CHOICE="e"
+ fi
if [ -n "`findtool festival`" ]; then
FESTIVAL="(F)estival "
FESTIVAL_OPTS=""
diff --git a/tools/voice.pl b/tools/voice.pl
index edb2c9f233..bc076d5386 100755
--- a/tools/voice.pl
+++ b/tools/voice.pl
@@ -79,30 +79,43 @@ my %festival_lang_map = (
my %gtts_lang_map = (
'english' => 'en-gb', # Always first, it's the golden master
+ 'czech' => 'cs', # not supported
'deutsch' => 'de',
- 'english-us' => 'en-us',
+ 'english-us' => 'en-us',
+ 'espanol' => 'es-es',
'francais' => 'fr-fr',
- 'greek' => 'gr',
- 'italiano' => 'it',
+ 'greek' => 'gr',
+ 'magyar' => 'hu',
+ 'italiano' => 'it',
+# 'nederlands' => 'nl', # not supported
'norsk' => 'no',
'polski' => 'pl',
'russian' => 'ru',
'slovak' => 'sk',
- 'srpski' => 'sr',
+ 'srpski' => 'sr',
+ 'svenska' => 'sv',
+ 'turkce' => 'tr',
);
my %espeak_lang_map = (
'english' => 'en-gb', # Always first, it's the golden master
+ 'czech' => 'cs',
'deutsch' => 'de',
- 'english-us' => 'en-us',
+ 'english-us' => 'en-us',
+ 'espanol' => 'es',
'francais' => 'fr-fr',
-# 'greek' => 'gr',
- 'italiano' => 'it',
+ 'greek' => 'el',
+ 'nederlands' => 'nl',
+ 'magyar' => 'hu',
+ 'italiano' => 'it',
+ 'japanese' => 'ja',
'norsk' => 'no',
'polski' => 'pl',
'russian' => 'ru',
'slovak' => 'sk',
- 'srpski' => 'sr',
+ 'srpski' => 'sr',
+ 'svenska' => 'sv',
+ 'turkce' => 'tr',
);
# Initialize TTS engine. May return an object or value which will be passed