mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 14:04:27 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user