mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 21:39:47 +00:00
[1.45.04] release
Don't speak punctuation names faster at high speeds. lang=ml, recognise "virama + U+200d" (zero-width joiner) to indicte 'chillu' characters. Fix problem of punctuation character announcement repeated at the start of the next sentence after speaking is stopped. Fixed crash due to large numbers of box-drawing characters in text input. Fixed phoneme translation of 't' sounds for US-English voices. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@261 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+23
-15
@@ -1540,14 +1540,32 @@ static int SetWithRange0(int value, int max)
|
||||
}
|
||||
|
||||
|
||||
static void SetPitchFormants()
|
||||
{//===========================
|
||||
int ix;
|
||||
int factor;
|
||||
int pitch_value;
|
||||
|
||||
// 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;
|
||||
|
||||
factor = 256 + (25 * (pitch_value - 50))/50;
|
||||
for(ix=0; ix<=5; ix++)
|
||||
{
|
||||
wvoice->freq[ix] = (wvoice->freq2[ix] * factor)/256;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
void SetEmbedded(int control, int value)
|
||||
{//=====================================
|
||||
// there was an embedded command in the text at this point
|
||||
int sign=0;
|
||||
int command;
|
||||
int ix;
|
||||
int factor;
|
||||
int pitch_value;
|
||||
|
||||
command = control & 0x1f;
|
||||
if((control & 0x60) == 0x60)
|
||||
@@ -1570,18 +1588,7 @@ void SetEmbedded(int control, int value)
|
||||
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;
|
||||
|
||||
factor = 256 + (25 * (pitch_value - 50))/50;
|
||||
for(ix=0; ix<=5; ix++)
|
||||
{
|
||||
wvoice->freq[ix] = (wvoice->freq2[ix] * factor)/256;
|
||||
}
|
||||
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;
|
||||
SetPitchFormants();
|
||||
break;
|
||||
|
||||
case EMBED_A: // amplitude
|
||||
@@ -1618,6 +1625,7 @@ void WavegenSetVoice(voice_t *v)
|
||||
option_harmonic1 = 6;
|
||||
}
|
||||
WavegenSetEcho();
|
||||
SetPitchFormants();
|
||||
MarkerEvent(espeakEVENT_SAMPLERATE,0,wvoice->samplerate,out_ptr);
|
||||
// WVoiceChanged(wvoice);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user