[1.29.18] Add data for Serbian voice ("sr").

Moved Croatian/Bosnian/Serbian dictionary source data to hbs_rules, hbs_list.
Added data for Ancient Greek voice ("grc").
In voice files, the attribute: word n  adds a short pause between words. n = 1 to 4 for increasing pause length.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@103 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2007-11-10 22:10:43 +00:00
parent c049552f9e
commit f9725f9f64
51 changed files with 1512 additions and 503 deletions
+29 -9
View File
@@ -86,6 +86,21 @@ void strncpy0(char *to,const char *from, int size)
to[size-1] = 0;
}
#ifdef ARCH_BIG
int reverse_word_bytes(int word)
{//=============================
// reverse the order of bytes from little-endian to big-endian
int ix;
int word2 = 0;
for(ix=24; ix>=0; ix -= 8)
{
word2 |= (word >> ix) & 0xff;
word2 = word2 << 8;
}
return(word2);
}
#endif
int LookupMnem(MNEM_TAB *table, char *string)
@@ -237,6 +252,15 @@ void Translator::InitGroups(void)
pw += 2; // find the end of the replacement list, each entry is 2 words.
}
p = (char *)(pw+1);
#ifdef ARCH_BIG
pw = (unsigned int *)langopts.replace_chars;
while(*pw != 0)
{
*pw = reverse_word_bytes(*pw);
pw++;
}
#endif
continue;
}
@@ -1280,23 +1304,19 @@ void Translator::SetWordStress(char *output, unsigned int dictionary_flags, int
if((ph = phoneme_tab[*p]) != NULL)
{
int gap = langopts.word_gap & 0xf00;
if(ph->type == phSTRESS)
ph = phoneme_tab[p[1]];
if(((gap) && (vowel_stress[1] >= 4) && (prev_stress >= 4)) || (langopts.word_gap & 0x8))
#ifdef deleted
int gap = langopts.word_gap & 0x700;
if((gap) && (vowel_stress[1] >= 4) && (prev_stress >= 4))
{
/* two primary stresses together, insert a short pause */
if(gap == 0x0300)
*output++ = phonPAUSE;
else
if((gap == 0x0200) && (ph->type == phVOWEL))
*output++ = phonGLOTTALSTOP;
else
*output++ = phonPAUSE_SHORT;
*output++ = pause_phonemes[gap >> 8];
}
else
#endif
if((langopts.vowel_pause & 0x30) && (ph->type == phVOWEL))
{
// word starts with a vowel