mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-01 21:58:52 +00:00
[1.39.26]
Added languages: ca (Catalan) lv (Latvian) Numbers: allow for languages which have numbers for 100,000 and (or not) 10,000,000 (eg. hi, sw) Phoneme [ts] new files in phsource/ustop *_rules: fix crash for lettergroups numbers greater than 10, and better error reporting. Languages: eo, jbo: adjust syllable lengths. Language: en, fix "1st, 2nd, 3rd, 5th". But a full ordinal number feature is still needed. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@202 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+13
-1
@@ -686,6 +686,8 @@ int Translator::IsLetterGroup(char *word, int group, int pre)
|
||||
char *w;
|
||||
|
||||
p = letterGroups[group];
|
||||
if(p == NULL)
|
||||
return(0);
|
||||
|
||||
while(*p != RULE_GROUP_END)
|
||||
{
|
||||
@@ -1012,7 +1014,9 @@ void Translator::SetWordStress(char *output, unsigned int dictionary_flags, int
|
||||
int unstressed_word = 0;
|
||||
char *max_output;
|
||||
int final_ph;
|
||||
int final_ph2;
|
||||
int mnem;
|
||||
int mnem2;
|
||||
int post_tonic;
|
||||
int opt_length;
|
||||
int done;
|
||||
@@ -1043,6 +1047,7 @@ void Translator::SetWordStress(char *output, unsigned int dictionary_flags, int
|
||||
}
|
||||
if(ix == 0) return;
|
||||
final_ph = phonetic[ix-1];
|
||||
final_ph2 = phonetic[ix-2];
|
||||
|
||||
max_output = output + (N_WORD_PHONEMES-3); /* check for overrun */
|
||||
|
||||
@@ -1131,7 +1136,14 @@ void Translator::SetWordStress(char *output, unsigned int dictionary_flags, int
|
||||
else
|
||||
{
|
||||
mnem = phoneme_tab[final_ph]->mnemonic;
|
||||
if((mnem != 'n') && (mnem != 's'))
|
||||
mnem2 = phoneme_tab[final_ph2]->mnemonic;
|
||||
|
||||
if((mnem == 's') && (mnem2 == 'n'))
|
||||
{
|
||||
// -ns stress remains on penultimate syllable
|
||||
}
|
||||
else
|
||||
if(((mnem != 'n') && (mnem != 's')) || (phoneme_tab[final_ph2]->type != phVOWEL))
|
||||
{
|
||||
stressed_syllable = vowel_count - 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user