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:
Juho Hiltunen
2021-08-10 19:57:53 +03:00
parent 3038d40081
commit d80f1a80a2
6 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -378,8 +378,8 @@ const char *EncodePhonemes(const char *p, char *outptr, int *bad_phoneme)
}
*outptr = 0;
if (c == 0) {
if (strcmp(p_lang, "en") == 0) {
*p_lang = 0; // don't need "en", it's assumed by default
if (strcmp(p_lang, ESPEAKNG_DEFAULT_VOICE) == 0) {
*p_lang = 0; // don't need ESPEAKNG_DEFAULT_VOICE, it's assumed by default
return p;
}
} else