Phonetables: Use "length" field in Tone phonemes to adjust the lengths of the vowel.

git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@206 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2008-12-04 15:40:32 +00:00
parent f90a4e369e
commit 897237bcf1
29 changed files with 76 additions and 47 deletions
+10
View File
@@ -278,6 +278,7 @@ void Translator::CalcLengths()
int embedded_ix = 0;
int min_drop;
int emphasized;
int tone_mod;
unsigned char *pitch_env=NULL;
for(ix=1; ix<n_phoneme_list; ix++)
@@ -550,6 +551,15 @@ void Translator::CalcLengths()
length_mod = (length_mod * len)/128;
if(p->tone_ph != 0)
{
if((tone_mod = phoneme_tab[p->tone_ph]->std_length) > 0)
{
// a tone phoneme specifies a percentage change to the length
length_mod = (length_mod * tone_mod) / 100;
}
}
if(end_of_clause == 2)
{
// this is the last syllable in the clause, lengthen it - more for short vowels