mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-07 23:31:26 +00:00
[1.37.09]
Fixed pitch adjustments for mbrola voices (eg. -p option). Changes to languages: pt (mb-br4), fr, af git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@181 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "voice.h"
|
||||
|
||||
extern int Read4Bytes(FILE *f);
|
||||
extern void SetPitch2(voice_t *voice, int pitch1, int pitch2, int *pitch_base, int *pitch_range);
|
||||
|
||||
#ifdef USE_MBROLA_LIB
|
||||
|
||||
@@ -285,15 +286,9 @@ static char *WritePitch(int env, int pitch1, int pitch2, int split, int final)
|
||||
output[0] = 0;
|
||||
pitch_env = envelope_data[env];
|
||||
|
||||
if(pitch1 > pitch2)
|
||||
{
|
||||
x = pitch1; // swap values
|
||||
pitch1 = pitch2;
|
||||
pitch2 = x;
|
||||
}
|
||||
|
||||
pitch_base = voice->pitch_base + (pitch1 * voice->pitch_range);
|
||||
pitch_range = voice->pitch_base + (pitch2 * voice->pitch_range) - pitch_base;
|
||||
SetPitch2(voice, pitch1, pitch2, &pitch_base, &pitch_range);
|
||||
|
||||
|
||||
env_split = (split * 128)/100;
|
||||
if(env_split < 0)
|
||||
|
||||
Reference in New Issue
Block a user