mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-06 00:34:13 +00:00
Use ESPEAKNG_DEFAULT_VOICE instead of hard coded "en".
This will make it easier to set a default voice other than
English. This is important for cases when a language will fall back to
the default voice.
Some references to L('e', 'n') still need to be changed.
This commit is contained in:
@@ -253,7 +253,7 @@ static const char *LookupCharName(Translator *tr, int c, int only)
|
||||
|
||||
if ((only == 0) && ((phonemes[0] == 0) || (phonemes[0] == phonSWITCH)) && (tr->translator_name != L('e', 'n'))) {
|
||||
// not found, try English
|
||||
SetTranslator2("en");
|
||||
SetTranslator2(ESPEAKNG_DEFAULT_VOICE);
|
||||
string = &single_letter[1];
|
||||
single_letter[1] = '_';
|
||||
if (LookupDictList(translator2, &string, phonemes, flags, 0, NULL) == 0) {
|
||||
@@ -261,7 +261,7 @@ static const char *LookupCharName(Translator *tr, int c, int only)
|
||||
LookupDictList(translator2, &string, phonemes, flags, 0, NULL);
|
||||
}
|
||||
if (phonemes[0])
|
||||
lang_name = "en";
|
||||
lang_name = ESPEAKNG_DEFAULT_VOICE;
|
||||
else
|
||||
SelectPhonemeTable(voice->phoneme_tab_ix); // revert to original phoneme table
|
||||
}
|
||||
@@ -270,7 +270,7 @@ static const char *LookupCharName(Translator *tr, int c, int only)
|
||||
if (lang_name) {
|
||||
SetWordStress(translator2, phonemes, flags, -1, 0);
|
||||
DecodePhonemes(phonemes, phonemes2);
|
||||
sprintf(buf, "[\002_^_%s %s _^_%s]]", "en", phonemes2, WordToString2(tr->translator_name));
|
||||
sprintf(buf, "[\002_^_%s %s _^_%s]]", ESPEAKNG_DEFAULT_VOICE, phonemes2, WordToString2(tr->translator_name));
|
||||
SelectPhonemeTable(voice->phoneme_tab_ix); // revert to original phoneme table
|
||||
} else {
|
||||
SetWordStress(tr, phonemes, flags, -1, 0);
|
||||
|
||||
Reference in New Issue
Block a user