mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 21:39:47 +00:00
[1.47.03]
git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@329 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+8
-5
@@ -2694,7 +2694,7 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
|
||||
{
|
||||
if(tr->langopts.alt_alphabet == alphabet->offset)
|
||||
{
|
||||
sprintf(phonemes,"%c%s",phonSWITCH, tr->langopts.alt_alphabet_lang);
|
||||
sprintf(phonemes,"%c%s",phonSWITCH, WordToString2(tr->langopts.alt_alphabet_lang));
|
||||
return(0);
|
||||
}
|
||||
if(alphabet->flags & AL_WORDS)
|
||||
@@ -2984,6 +2984,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
|
||||
const char *word_end;
|
||||
const char *word1;
|
||||
int wflags = 0;
|
||||
int lookup_symbol;
|
||||
char word_buf[N_WORD_BYTES+1];
|
||||
char dict_flags_buf[80];
|
||||
|
||||
@@ -2992,6 +2993,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
|
||||
wflags = wtab->flags;
|
||||
}
|
||||
|
||||
lookup_symbol = flags[1] & FLAG_LOOKUP_SYMBOL;
|
||||
word1 = word;
|
||||
if(tr->transpose_min > 0)
|
||||
{
|
||||
@@ -3178,9 +3180,9 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
|
||||
continue;
|
||||
}
|
||||
|
||||
if((dictionary_flags2 & FLAG_ATEND) && (word_end < translator->clause_end))
|
||||
if((dictionary_flags2 & FLAG_ATEND) && (word_end < translator->clause_end) && (lookup_symbol==0))
|
||||
{
|
||||
// only use this pronunciation if it's the last word of the clause
|
||||
// only use this pronunciation if it's the last word of the clause, or called from Lookup()
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3192,7 +3194,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
|
||||
|
||||
if((dictionary_flags2 & FLAG_SENTENCE) && !(translator->clause_terminator & CLAUSE_BIT_SENTENCE))
|
||||
{
|
||||
// only uis this clause is a sentence , i.e. terminator is {. ? !} not {, : :}
|
||||
// only if this clause is a sentence , i.e. terminator is {. ? !} not {, : :}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3471,7 +3473,8 @@ int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *f
|
||||
int Lookup(Translator *tr, const char *word, char *ph_out)
|
||||
{//===================================================
|
||||
unsigned int flags[2];
|
||||
flags[0] = flags[1] = 0;
|
||||
flags[0] = 0;
|
||||
flags[1] = FLAG_LOOKUP_SYMBOL;
|
||||
char *word1 = (char *)word;
|
||||
return(LookupDictList(tr, &word1, ph_out, flags, 0, NULL));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user