mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-15 18:04:26 +00:00
[1.39.11]
Fix problem in *_rules files. Conditional rules could cause corrupt phoneme strings. Voice files, "replace" command using an "unstressed" phoneme now ensures the syllable is unstressed. lang: us, pronunciation changes, use new phonemeeeeeeeee [@/] (at end of words) and [O]. lang: fr, pronunciation changes. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@197 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+5
-3
@@ -1832,9 +1832,11 @@ void Translator::MatchRule(char *word[], const char *group, char *rule, MatchRec
|
||||
if(common_phonemes != NULL)
|
||||
{
|
||||
match.phonemes = common_phonemes;
|
||||
if(*match.phonemes == RULE_CONDITION)
|
||||
match.phonemes += 2; // skip over condition number
|
||||
while(((rb = *match.phonemes++) != 0) && (rb != RULE_PHONEMES));
|
||||
while(((rb = *match.phonemes++) != 0) && (rb != RULE_PHONEMES))
|
||||
{
|
||||
if(rb == RULE_CONDITION)
|
||||
match.phonemes++; // skip over condition number
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -152,6 +152,8 @@ int Translator::SubstitutePhonemes(PHONEME_LIST2 *plist_out)
|
||||
|
||||
// substitute the replacement phoneme
|
||||
plist2->phcode = replace_phonemes[k].new_ph;
|
||||
if((plist2->stress > 1) && (phoneme_tab[plist2->phcode]->phflags & phUNSTRESSED))
|
||||
plist2->stress = 0; // the replacement must be unstressed
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2036,7 +2036,7 @@ void *Translator::TranslateClause(FILE *f_text, const void *vp_input, int *tone_
|
||||
|
||||
embedded_ix = 0;
|
||||
embedded_read = 0;
|
||||
option_phoneme_input &= 1; // clear bit 1 (temporary indication)
|
||||
option_phoneme_input &= ~2; // clear bit 1 (temporary indication)
|
||||
|
||||
if((clause_start_char = count_characters) < 0)
|
||||
clause_start_char = 0;
|
||||
|
||||
Reference in New Issue
Block a user