mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-06 07:03:12 +00:00
[1.43.48]
Add mbrowrap.cpp to emulate the mbrola library which is available in Windows, but not on Linux. mbrola voices in command-line espeak and libespeak now call mbrola directly rather than generating phoneme information as text. Mbrola phonemes as text is still available with the new --pho command-line option. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@248 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+12
-28
@@ -135,7 +135,7 @@ static void EndPitch(int voice_break)
|
||||
syllable_centre = -1;
|
||||
memset(vowel_transition,0,sizeof(vowel_transition));
|
||||
}
|
||||
} // end of Synthesize::EndPitch
|
||||
} // end of EndPitch
|
||||
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ static void DoAmplitude(int amp, unsigned char *amp_env)
|
||||
q[2] = (long)amp_env;
|
||||
q[3] = amp;
|
||||
WcmdqInc();
|
||||
} // end of Synthesize::DoAmplitude
|
||||
} // end of DoAmplitude
|
||||
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ static void DoPitch(unsigned char *env, int pitch1, int pitch2)
|
||||
q[2] = (long)env;
|
||||
q[3] = (pitch1 << 16) + pitch2;
|
||||
WcmdqInc();
|
||||
} // end of Synthesize::DoPitch
|
||||
} // end of DoPitch
|
||||
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ static void DoPause(int length, int control)
|
||||
wcmdq[wcmdq_tail][1] = len;
|
||||
WcmdqInc();
|
||||
last_frame = NULL;
|
||||
} // end of Synthesize::DoPause
|
||||
} // end of DoPause
|
||||
|
||||
|
||||
extern int seq_len_adjust; // temporary fix to advance the start point for playing the wav sample
|
||||
@@ -1172,8 +1172,8 @@ if(which==1)
|
||||
|
||||
|
||||
|
||||
static void DoMarker(int type, int char_posn, int length, int value)
|
||||
{//=================================================================
|
||||
void DoMarker(int type, int char_posn, int length, int value)
|
||||
{//==========================================================
|
||||
// This could be used to return an index to the word currently being spoken
|
||||
// Type 1=word, 2=sentence, 3=named marker, 4=play audio, 5=end
|
||||
wcmdq[wcmdq_tail][0] = WCMD_MARKER;
|
||||
@@ -1182,7 +1182,7 @@ static void DoMarker(int type, int char_posn, int length, int value)
|
||||
wcmdq[wcmdq_tail][3] = value;
|
||||
WcmdqInc();
|
||||
|
||||
} // end of Synthesize::DoMarker
|
||||
} // end of DoMarker
|
||||
|
||||
|
||||
void DoVoiceChange(voice_t *v)
|
||||
@@ -1198,8 +1198,8 @@ void DoVoiceChange(voice_t *v)
|
||||
}
|
||||
|
||||
|
||||
static void DoEmbedded(int &embix, int sourceix)
|
||||
{//=============================================
|
||||
void DoEmbedded(int &embix, int sourceix)
|
||||
{//======================================
|
||||
// There were embedded commands in the text at this point
|
||||
unsigned int word; // bit 7=last command for this word, bits 5,6 sign, bits 0-4 command
|
||||
unsigned int value;
|
||||
@@ -1279,14 +1279,12 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
|
||||
PHONEME_DATA phdata_tone;
|
||||
FMT_PARAMS fmtp;
|
||||
|
||||
#ifdef TEST_MBROLA
|
||||
if(mbrola_name[0] != 0)
|
||||
return(MbrolaGenerate(phoneme_list,n_ph,resume));
|
||||
#endif
|
||||
|
||||
if(option_quiet)
|
||||
return(0);
|
||||
|
||||
if(mbrola_name[0] != 0)
|
||||
return(MbrolaGenerate(phoneme_list,n_ph,resume));
|
||||
|
||||
if(resume == 0)
|
||||
{
|
||||
ix = 1;
|
||||
@@ -1873,20 +1871,6 @@ int SpeakNextClause(FILE *f_in, const void *text_in, int control)
|
||||
return(1);
|
||||
}
|
||||
|
||||
if(mbrola_name[0] != 0)
|
||||
{
|
||||
#ifdef USE_MBROLA_LIB
|
||||
MbrolaTranslate(phoneme_list,n_phoneme_list,NULL);
|
||||
#else
|
||||
{
|
||||
FILE *f_mbrola;
|
||||
if((f_mbrola = f_trans) == stderr)
|
||||
f_mbrola = stdout;
|
||||
MbrolaTranslate(phoneme_list,n_phoneme_list,f_mbrola);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Generate(phoneme_list,&n_phoneme_list,0);
|
||||
WavegenOpenSound();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user