1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Solomon Peachy 2020-07-10 19:49:35 -04:00
parent 711bff47b7
commit 938d820355
2 changed files with 29 additions and 8 deletions

8
tools/configure vendored
View file

@ -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=""

View file

@ -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