mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-01 21:58:52 +00:00
[1.47.14]
Language changes: an, en, es, fa, gu, it, pt, ta, te. Voice files: added attribute 'dictdialect', eg: dictdialect en-us uses the US English voice to speak words or rules which are marked with _^_EN git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@366 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+33
-2
@@ -409,7 +409,7 @@ int IsAlpha(unsigned int c)
|
||||
if(c == 0x0605)
|
||||
return(1);
|
||||
|
||||
if((c >= 0x64b) && (c <= 0x65e))
|
||||
if((c == 0x670) || ((c >= 0x64b) && (c <= 0x65e)))
|
||||
return(1); // arabic vowel marks
|
||||
|
||||
if((c >= 0x300) && (c <= 0x36f))
|
||||
@@ -1714,8 +1714,26 @@ int SetTranslator2(const char *new_language)
|
||||
{//=========================================
|
||||
// Set translator2 to a second language
|
||||
int new_phoneme_tab;
|
||||
const char *new_phtab_name;
|
||||
int bitmap;
|
||||
int dialect = 0;
|
||||
|
||||
if((new_phoneme_tab = SelectPhonemeTableName(new_language)) >= 0)
|
||||
new_phtab_name = new_language;
|
||||
if((bitmap = translator->langopts.dict_dialect) != 0)
|
||||
{
|
||||
if((bitmap & (1 << DICTDIALECT_EN_US)) && (strcmp(new_language, "en") == 0))
|
||||
{
|
||||
new_phtab_name = "en-us";
|
||||
dialect = DICTDIALECT_EN_US;
|
||||
}
|
||||
if((bitmap & (1 << DICTDIALECT_ES_LA)) && (strcmp(new_language, "es") == 0))
|
||||
{
|
||||
new_phtab_name = "es-la";
|
||||
dialect = DICTDIALECT_ES_LA;
|
||||
}
|
||||
}
|
||||
|
||||
if((new_phoneme_tab = SelectPhonemeTableName(new_phtab_name)) >= 0)
|
||||
{
|
||||
if((translator2 != NULL) && (strcmp(new_language,translator2_language) != 0))
|
||||
{
|
||||
@@ -1735,6 +1753,19 @@ int SetTranslator2(const char *new_language)
|
||||
new_phoneme_tab = -1;
|
||||
translator2_language[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(dialect == DICTDIALECT_EN_US)
|
||||
{
|
||||
// en-us
|
||||
translator2->dict_condition = 0x48; // bits 3, 6
|
||||
translator2->langopts.param[LOPT_REDUCE_T] = 1;
|
||||
}
|
||||
if(dialect == DICTDIALECT_ES_LA)
|
||||
{
|
||||
translator2->dict_condition = 0x04; // bit 2
|
||||
}
|
||||
}
|
||||
translator2->phoneme_tab_ix = new_phoneme_tab;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user