mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 06:01:53 +00:00
[1.46.33]
Fix bug, some letter names spoken wrongly (eg. accented letters). Recognize Arabic full-stop (U+06D4). Changes to languages: en, pt, ka. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@299 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+27
-18
@@ -1495,21 +1495,24 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
|
||||
stress = 3;
|
||||
|
||||
|
||||
if((stressflags & 0x1000) && (vowel_count == 2))
|
||||
if(unstressed_word == 0)
|
||||
{
|
||||
// Two syllable word, if one syllable has primary stress, then give the other secondary stress
|
||||
if(vowel_stress[1] == 4)
|
||||
vowel_stress[2] = 3;
|
||||
if(vowel_stress[2] == 4)
|
||||
vowel_stress[1] = 3;
|
||||
}
|
||||
|
||||
if((stressflags & 0x2000) && (vowel_stress[1] < 0))
|
||||
{
|
||||
// If there is only one syllable before the primary stress, give it a secondary stress
|
||||
if((vowel_count > 2) && (vowel_stress[2] >= 4))
|
||||
if((stressflags & 0x1000) && (vowel_count == 3))
|
||||
{
|
||||
vowel_stress[1] = 3;
|
||||
// Two syllable word, if one syllable has primary stress, then give the other secondary stress
|
||||
if(vowel_stress[1] == 4)
|
||||
vowel_stress[2] = 3;
|
||||
if(vowel_stress[2] == 4)
|
||||
vowel_stress[1] = 3;
|
||||
}
|
||||
|
||||
if((stressflags & 0x2000) && (vowel_stress[1] < 0))
|
||||
{
|
||||
// If there is only one syllable before the primary stress, give it a secondary stress
|
||||
if((vowel_count > 3) && (vowel_stress[2] >= 4))
|
||||
{
|
||||
vowel_stress[1] = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2873,13 +2876,15 @@ int TransposeAlphabet(Translator *tr, char *text)
|
||||
int max;
|
||||
const char *map;
|
||||
char *p = text;
|
||||
char *p2 = text;
|
||||
char *p2;
|
||||
int all_alpha=1;
|
||||
int bits;
|
||||
int acc;
|
||||
int pairs_start;
|
||||
const short *pairs_list;
|
||||
char buf[N_WORD_BYTES];
|
||||
|
||||
p2 = buf;
|
||||
offset = tr->transpose_min - 1;
|
||||
min = tr->transpose_min;
|
||||
max = tr->transpose_max;
|
||||
@@ -2926,8 +2931,8 @@ int TransposeAlphabet(Translator *tr, char *text)
|
||||
acc=0;
|
||||
bits=0;
|
||||
|
||||
p = text;
|
||||
p2 = text;
|
||||
p = buf;
|
||||
p2 = buf;
|
||||
while((c = *p++) != 0)
|
||||
{
|
||||
if((pairs_list = tr->frequent_pairs) != NULL)
|
||||
@@ -2958,9 +2963,13 @@ int TransposeAlphabet(Translator *tr, char *text)
|
||||
*p2++ = (acc << (8-bits));
|
||||
}
|
||||
*p2 = 0;
|
||||
return((p2 - text) | 0x40); // bit 6 indicates compressed characters
|
||||
strcpy(text, buf);
|
||||
return((p2 - buf) | 0x40); // bit 6 indicates compressed characters
|
||||
}
|
||||
else
|
||||
{
|
||||
return(strlen(text));
|
||||
}
|
||||
return(p2 - text);
|
||||
} // end of TransposeAlphabet
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user