mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 06:01:53 +00:00
[1.43.16]
git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@242 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+11
-4
@@ -1501,7 +1501,7 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa
|
||||
{
|
||||
char *p2;
|
||||
int ok = 1;
|
||||
int flags2;
|
||||
int flags2 = 0;
|
||||
int c_word2;
|
||||
char ph_buf[N_WORD_PHONEMES];
|
||||
|
||||
@@ -1520,15 +1520,15 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa
|
||||
|
||||
if(ok != 0)
|
||||
{
|
||||
strcpy(ph_buf,word_phonemes);
|
||||
flags2 = TranslateWord(translator, p2+1, 0, wtab+1);
|
||||
|
||||
if(sylimit & 0x100)
|
||||
{
|
||||
// only if the second word has $alt attribute
|
||||
strcpy(ph_buf,word_phonemes);
|
||||
flags2 = TranslateWord(translator, p2+1, 0, wtab+1);
|
||||
if((flags2 & FLAG_ALT_TRANS) == 0)
|
||||
{
|
||||
ok = 0;
|
||||
strcpy(word_phonemes,ph_buf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1537,6 +1537,11 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa
|
||||
// not if the next word is end-of-sentence
|
||||
ok = 0;
|
||||
}
|
||||
|
||||
if(ok == 0)
|
||||
{
|
||||
strcpy(word_phonemes,ph_buf);
|
||||
}
|
||||
}
|
||||
|
||||
if(ok)
|
||||
@@ -1551,6 +1556,8 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa
|
||||
}
|
||||
else
|
||||
{
|
||||
if(flags == 0)
|
||||
flags = flags2; // no flags for the combined word, so use flags from the second word eg. lang-hu "nem december 7-e"
|
||||
flags |= FLAG_SKIPWORDS;
|
||||
dictionary_skipwords = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user