mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-06 23:16:21 +00:00
[1.36]
espeak_Key(key_name) If key_name is a single character, it speaks the character name. Otherwise it speaks key_name as a text string. This is the same behaviour as <say-as interpret-as="tts:key"> Fix: SAPI5 was restricted to 360 wmp. Now the top speed (390 wpm) is allowed. Fix error in phoneme translation data for mbrola "cr1" Croation voice. *_list files: Allow word groups which have no phoneme translation, so that just attributes can be set. The words are considered as a single hyphenated word. Fix: $textmode in *_list files, allow replacement by a word which is also translated in the *_list file. lang=pl: many additions to pl_rules, pl_list git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@165 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -637,6 +637,7 @@ int Translator::TranslateWord(char *word1, int next_pause, WORD_TAB *wtab)
|
||||
int prefix_flags = 0;
|
||||
int confirm_prefix;
|
||||
int spell_word;
|
||||
int stress_bits;
|
||||
int emphasize_allcaps = 0;
|
||||
int wflags = wtab->flags;
|
||||
int wmark = wtab->wmark;
|
||||
@@ -684,6 +685,37 @@ int Translator::TranslateWord(char *word1, int next_pause, WORD_TAB *wtab)
|
||||
else
|
||||
{
|
||||
found = LookupDictList(&word1, phonemes, dictionary_flags, FLAG_ALLOW_TEXTMODE, wtab); // the original word
|
||||
if(dictionary_flags[0] & FLAG_TEXTMODE)
|
||||
{
|
||||
stress_bits = dictionary_flags[0] & 0x7f;
|
||||
found = LookupDictList(&word1, phonemes, dictionary_flags2, 0, wtab); // the text replacement
|
||||
if(dictionary_flags2[0]!=0)
|
||||
{
|
||||
dictionary_flags[0] = dictionary_flags2[0];
|
||||
dictionary_flags[1] = dictionary_flags2[1];
|
||||
if(stress_bits != 0)
|
||||
{
|
||||
// keep any stress information from the original word
|
||||
dictionary_flags[0] = (dictionary_flags[0] & ~0x7f) | stress_bits;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if((found==0) && (dictionary_flags[0] & FLAG_SKIPWORDS))
|
||||
{
|
||||
// grouped words, but no translation. Join the words with hyphens.
|
||||
wordx = word1;
|
||||
ix = 0;
|
||||
while(ix < dictionary_skipwords)
|
||||
{
|
||||
if(*wordx == ' ')
|
||||
{
|
||||
*wordx = '-';
|
||||
ix++;
|
||||
}
|
||||
wordx++;
|
||||
}
|
||||
}
|
||||
|
||||
// if textmode, LookupDictList() replaces word1 by the new text and returns found=0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user