[1.31.19}

Fix: Events callback, fix word length information for words with multibyte characters.
Fix: Re-translating a word in a different language after the first langauge has started speaking individual letters, gave silence.
Announce punctuation.  If character name is not defined, use English.
Announce punctuation.  Fix pitch of the voice which announces punctuation characters.
[[Phonemes]] text input.  Allow the language-switch phoneme eg. [[_^_EN hEloU _^_FR]] in the input.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@152 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2008-02-28 20:54:03 +00:00
parent 16fba5a1c1
commit 417395b033
36 changed files with 630 additions and 347 deletions
+11 -3
View File
@@ -144,7 +144,7 @@ int wcmdq_head=0;
int wcmdq_tail=0;
// pitch,speed,
int embedded_default[N_EMBEDDED_VALUES] = {0,50,170,100,50, 0,50, 0,170,0,0,0,0,0};
int embedded_default[N_EMBEDDED_VALUES] = {0,50,170,100,50, 0,0, 0,170,0,0,0,0,0};
static int embedded_max[N_EMBEDDED_VALUES] = {0,0x7fff,360,300,99,99,99, 0,360,0,0,0,0,4};
#define N_CALLBACK_IX N_WAV_BUF-2 // adjust this delay to match display with the currently spoken word
@@ -813,6 +813,12 @@ static void WavegenSetEcho(void)
amp = embedded_value[EMBED_H];
delay = 130;
}
if(embedded_value[EMBED_T] > 0)
{
// announcing punctuation
amp = embedded_value[EMBED_T] * 10;
delay = 130;
}
if(delay == 0)
amp = 0;
@@ -1517,8 +1523,9 @@ void SetEmbedded(int control, int value)
switch(command)
{
case EMBED_P:
case EMBED_T:
WavegenSetEcho(); // and drop through to case P
case EMBED_P:
// adjust formants to give better results for a different voice pitch
if((pitch_value = embedded_value[EMBED_P]) > MAX_PITCH_VALUE)
pitch_value = MAX_PITCH_VALUE;
@@ -1528,7 +1535,7 @@ void SetEmbedded(int control, int value)
{
wvoice->freq[ix] = (wvoice->freq2[ix] * factor)/256;
}
factor = (embedded_value[EMBED_T] - 50)*2;
factor = embedded_value[EMBED_T]*3;
wvoice->height[0] = (wvoice->height2[0] * (256 - factor*2))/256;
wvoice->height[1] = (wvoice->height2[1] * (256 - factor))/256;
break;
@@ -1623,6 +1630,7 @@ if(option_log_frames)
if((pitch_value = embedded_value[EMBED_P]) > MAX_PITCH_VALUE)
pitch_value = MAX_PITCH_VALUE;
pitch_value -= embedded_value[EMBED_T]; // adjust tone for announcing punctuation
if(pitch_value < 0)
pitch_value = 0;