[1.43.63]

Phoneme definitions.  Add "equivalents" table to translate phonemes from a foreign language (eg. English) into the equivalant phonemes of this language. This is used when *_rules and *_list files indicate that a word uses pronunciation rules from a different language.

Unpronouncable words can be recognised by rules in *_rule files.  This feature is now used for en, de, es.

Lang=ta, hi.  Letter-names for combining vowel characters are distinguished from stand-alone vowel characters by a preceding beep.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@251 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2010-08-02 09:09:25 +00:00
parent ebf0535e6d
commit 4423576af2
58 changed files with 1641 additions and 728 deletions
+16 -3
View File
@@ -766,7 +766,7 @@ static int CheckDotOrdinal(Translator *tr, char *word, char *word_end, WORD_TAB
if(word_end[0] == '.')
utf8_in(&c2, &word_end[2]);
else
utf8_in(&c2, &word_end[1]);
utf8_in(&c2, &word_end[0]);
if((word_end[1] != 0) && ((c2 == 0) || (wtab[0].flags & FLAG_COMMA_AFTER) || IsAlpha(c2)))
{
@@ -850,8 +850,8 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab)
flags[0] = 0;
flags[1] = 0;
if((tr->langopts.numbers & NUM_ROMAN_CAPITALS) && !(wtab[0].flags & FLAG_ALL_UPPER))
return(0);
if(((tr->langopts.numbers & NUM_ROMAN_CAPITALS) && !(wtab[0].flags & FLAG_ALL_UPPER)) || isdigit(word[-2]))
return(0); // not '2xx'
word_start = word;
while((c = *word++) != ' ')
@@ -889,6 +889,10 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab)
prev = value;
n_digits++;
}
if(isdigit(word[0]))
return(0); // eg. 'xx2'
acc += prev;
if(acc < tr->langopts.min_roman)
return(0);
@@ -896,6 +900,7 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab)
if(acc > tr->langopts.max_roman)
return(0);
Lookup(tr, "_roman",ph_roman); // precede by "roman" if _rom is defined in *_list
p = &ph_out[0];
@@ -931,6 +936,10 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab)
return(0);
}
}
else
{
wtab[0].flags |= FLAG_ORDINAL;
}
}
tr->prev_dict_flags = 0;
@@ -1071,6 +1080,10 @@ static int LookupThousands(Translator *tr, int value, int thousandplex, int thou
}
}
sprintf(ph_out,"%s%s",ph_of,ph_thousands);
if((value == 1) && (thousandplex == 1) && (tr->langopts.numbers & NUM_OMIT_1_THOUSAND))
return(1);
return(found_value);
}