mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-01 05:46:19 +00:00
[1.47.03e]
lang=zh: Fix: was speaking Chinese character names as character codes. lang=hr, sr: Fix: speak Cyrillic character names in the local langauge. Phoneme definitions: add new statement type "LengthAdd <signed number>". git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@335 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+20
-2
@@ -3469,16 +3469,34 @@ int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *f
|
||||
} // end of LookupDictList
|
||||
|
||||
|
||||
extern char word_phonemes[N_WORD_PHONEMES]; // a word translated into phoneme codes
|
||||
|
||||
int Lookup(Translator *tr, const char *word, char *ph_out)
|
||||
{//===================================================
|
||||
int found;
|
||||
unsigned int flags[2];
|
||||
int say_as;
|
||||
char *word1 = (char *)word;
|
||||
char text[80];
|
||||
|
||||
flags[0] = 0;
|
||||
flags[1] = FLAG_LOOKUP_SYMBOL;
|
||||
char *word1 = (char *)word;
|
||||
return(LookupDictList(tr, &word1, ph_out, flags, 0, NULL));
|
||||
found = LookupDictList(tr, &word1, ph_out, flags, FLAG_ALLOW_TEXTMODE, NULL);
|
||||
|
||||
if(flags[0] & FLAG_TEXTMODE)
|
||||
{
|
||||
say_as = option_sayas;
|
||||
option_sayas = 0; // don't speak replacement word as letter names
|
||||
text[0] = 0;
|
||||
strncpy0(&text[1], word1, sizeof(text));
|
||||
found = TranslateWord(tr, &text[1], 0, NULL, NULL);
|
||||
strcpy(ph_out, word_phonemes);
|
||||
option_sayas = say_as;
|
||||
}
|
||||
return(found);
|
||||
}
|
||||
|
||||
|
||||
int LookupFlags(Translator *tr, const char *word)
|
||||
{//==============================================
|
||||
char buf[100];
|
||||
|
||||
Reference in New Issue
Block a user