mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-08 07:32:32 +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:
+13
-5
@@ -71,9 +71,10 @@ int Translator_English::Unpronouncable(char *word)
|
||||
This function is language specific.
|
||||
*/
|
||||
|
||||
unsigned char c;
|
||||
int c;
|
||||
int vowel_posn=9;
|
||||
int index;
|
||||
int count;
|
||||
int ix;
|
||||
int apostrophe=0;
|
||||
|
||||
@@ -92,19 +93,26 @@ int Translator_English::Unpronouncable(char *word)
|
||||
}
|
||||
|
||||
index=0;
|
||||
while(((c = word[index++]) != 0) && !isspace(c))
|
||||
count=0;
|
||||
for(;;)
|
||||
{
|
||||
index += utf8_in(&c,&word[index],0);
|
||||
count++;
|
||||
|
||||
if((c==0) || (c==' '))
|
||||
break;
|
||||
|
||||
if(IsVowel(c) || (c == 'y'))
|
||||
{
|
||||
vowel_posn = index;
|
||||
vowel_posn = count;
|
||||
break;
|
||||
}
|
||||
|
||||
if(c == '\'')
|
||||
apostrophe = 1;
|
||||
else
|
||||
if((c < 'a') || (c > 'z'))
|
||||
return(0); // letter (not vowel) outside a-z range or apostrophe, abort test
|
||||
if((c < 'a') || (c > 0x241))
|
||||
return(0); // letter (not vowel) outside Latin character range or apostrophe, abort test
|
||||
}
|
||||
if((vowel_posn > 5) || ((word[0]!='s') && (vowel_posn > 4)))
|
||||
return(1); // no vowel, or no vowel in first four letters
|
||||
|
||||
Reference in New Issue
Block a user