mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-06 07:03:12 +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:
+1
-18
@@ -212,23 +212,6 @@ void DisplayVoices(FILE *f_out, char *language)
|
||||
|
||||
|
||||
|
||||
static void PitchAdjust(int pitch_adjustment)
|
||||
{//==========================================
|
||||
int ix, factor;
|
||||
|
||||
voice->pitch_base = (voice->pitch_base * pitch_adjust_tab[pitch_adjustment])/128;
|
||||
|
||||
// adjust formants to give better results for a different voice pitch
|
||||
factor = 256 + (25 * (pitch_adjustment - 50))/50;
|
||||
for(ix=0; ix<=5; ix++)
|
||||
{
|
||||
voice->freq[ix] = (voice->freq2[ix] * factor)/256;
|
||||
}
|
||||
} // end of PitchAdjustment
|
||||
|
||||
|
||||
|
||||
|
||||
static int OpenWaveFile(const char *path, int rate)
|
||||
//=================================================
|
||||
{
|
||||
@@ -734,7 +717,7 @@ int main (int argc, char **argv)
|
||||
|
||||
if(pitch_adjustment != 50)
|
||||
{
|
||||
PitchAdjust(pitch_adjustment);
|
||||
SetParameter(espeakPITCH,pitch_adjustment,0);
|
||||
}
|
||||
DoVoiceChange(voice);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user