mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 13:38:47 +00:00
[1.31.18]
Indicate unrecognized letters within a word by clicks. lang-tr: Non-standard lower case conversion for "I". Tone languages: indicate emphasis by increasing the pitch range. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@151 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+14
-2
@@ -1201,7 +1201,7 @@ void Translator::SetWordStress(char *output, unsigned int dictionary_flags, int
|
||||
if(stressed_syllable == 0)
|
||||
{
|
||||
stressed_syllable = vowel_count - 1;
|
||||
for(ix=2; ix < vowel_count; ix++)
|
||||
for(ix=1; ix < vowel_count; ix++)
|
||||
{
|
||||
if(vowel_stress[ix] == 1)
|
||||
{
|
||||
@@ -2303,7 +2303,7 @@ int Translator::TranslateRules(char *p_start, char *phonemes, int ph_size, char
|
||||
while(((c = *p) != ' ') && (c != 0))
|
||||
{
|
||||
if(IsAlpha(wc))
|
||||
any_alpha = wc;
|
||||
any_alpha++;
|
||||
wc_prev = wc;
|
||||
wc_bytes = utf8_in(&wc,p,0);
|
||||
|
||||
@@ -2420,6 +2420,18 @@ int Translator::TranslateRules(char *p_start, char *phonemes, int ph_size, char
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(match1.points == 0)
|
||||
{
|
||||
static const char str_unknown[4] = {phonCAPITAL,phonCAPITAL,phonCAPITAL,0};
|
||||
if(((any_alpha > 0) || (p[wc_bytes-1] > ' ')) && !iswpunct(wc))
|
||||
{
|
||||
// an unrecognised character in a word, indicate with clicks
|
||||
match1.phonemes = str_unknown;
|
||||
match1.points = 1;
|
||||
}
|
||||
p += (wc_bytes-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user