summaryrefslogtreecommitdiff
path: root/tools
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 /tools
parent711bff47b74641c888de59c269ed76e99f16a239 (diff)
downloadrockbox-938d82035530dde86ff607f4fe99194f1efe6c90.tar.gz
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
Diffstat (limited to 'tools')
-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 () {
1109 DEFAULT_NOISEFLOOR="500" 1109 DEFAULT_NOISEFLOOR="500"
1110 DEFAULT_CHOICE="e" 1110 DEFAULT_CHOICE="e"
1111 fi 1111 fi
1112 if [ -n "`findtool espeak-ng`" ]; then
1113 ESPEAK="(e)Speak-ng "
1114 ESPEAK_OPTS=""
1115 DEFAULT_TTS="espeak-ng"
1116 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
1117 DEFAULT_NOISEFLOOR="500"
1118 DEFAULT_CHOICE="e"
1119 fi
1112 if [ -n "`findtool festival`" ]; then 1120 if [ -n "`findtool festival`" ]; then
1113 FESTIVAL="(F)estival " 1121 FESTIVAL="(F)estival "
1114 FESTIVAL_OPTS="" 1122 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 = (
79 79
80my %gtts_lang_map = ( 80my %gtts_lang_map = (
81 'english' => 'en-gb', # Always first, it's the golden master 81 'english' => 'en-gb', # Always first, it's the golden master
82 'czech' => 'cs', # not supported
82 'deutsch' => 'de', 83 'deutsch' => 'de',
83 'english-us' => 'en-us', 84 'english-us' => 'en-us',
85 'espanol' => 'es-es',
84 'francais' => 'fr-fr', 86 'francais' => 'fr-fr',
85 'greek' => 'gr', 87 'greek' => 'gr',
86 'italiano' => 'it', 88 'magyar' => 'hu',
89 'italiano' => 'it',
90# 'nederlands' => 'nl', # not supported
87 'norsk' => 'no', 91 'norsk' => 'no',
88 'polski' => 'pl', 92 'polski' => 'pl',
89 'russian' => 'ru', 93 'russian' => 'ru',
90 'slovak' => 'sk', 94 'slovak' => 'sk',
91 'srpski' => 'sr', 95 'srpski' => 'sr',
96 'svenska' => 'sv',
97 'turkce' => 'tr',
92); 98);
93 99
94my %espeak_lang_map = ( 100my %espeak_lang_map = (
95 'english' => 'en-gb', # Always first, it's the golden master 101 'english' => 'en-gb', # Always first, it's the golden master
102 'czech' => 'cs',
96 'deutsch' => 'de', 103 'deutsch' => 'de',
97 'english-us' => 'en-us', 104 'english-us' => 'en-us',
105 'espanol' => 'es',
98 'francais' => 'fr-fr', 106 'francais' => 'fr-fr',
99# 'greek' => 'gr', 107 'greek' => 'el',
100 'italiano' => 'it', 108 'nederlands' => 'nl',
109 'magyar' => 'hu',
110 'italiano' => 'it',
111 'japanese' => 'ja',
101 'norsk' => 'no', 112 'norsk' => 'no',
102 'polski' => 'pl', 113 'polski' => 'pl',
103 'russian' => 'ru', 114 'russian' => 'ru',
104 'slovak' => 'sk', 115 'slovak' => 'sk',
105 'srpski' => 'sr', 116 'srpski' => 'sr',
117 'svenska' => 'sv',
118 'turkce' => 'tr',
106); 119);
107 120
108# Initialize TTS engine. May return an object or value which will be passed 121# Initialize TTS engine. May return an object or value which will be passed