mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-04 22:38:33 +00:00
1.46.02
This commit is contained in:
+26
-5
@@ -66,6 +66,7 @@ int (* uri_callback)(int, const char *, const char *) = NULL;
|
||||
int (* phoneme_callback)(const char *) = NULL;
|
||||
|
||||
char path_home[N_PATH_HOME]; // this is the espeak-data directory
|
||||
extern int saved_parameters[N_SPEECH_PARAM]; //Parameters saved on synthesis start
|
||||
|
||||
|
||||
void WVoiceChanged(voice_t *wvoice)
|
||||
@@ -543,9 +544,9 @@ static const char* label[] = {
|
||||
#endif
|
||||
|
||||
|
||||
void MarkerEvent(int type, unsigned int char_position, int value, unsigned char *out_ptr)
|
||||
{//======================================================================================
|
||||
// type: 1=word, 2=sentence, 3=named mark, 4=play audio, 5=end
|
||||
void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *out_ptr)
|
||||
{//==================================================================================================
|
||||
// type: 1=word, 2=sentence, 3=named mark, 4=play audio, 5=end, 7=phoneme
|
||||
ENTER("MarkerEvent");
|
||||
espeak_EVENT *ep;
|
||||
double time;
|
||||
@@ -574,7 +575,20 @@ void MarkerEvent(int type, unsigned int char_position, int value, unsigned char
|
||||
if((type == espeakEVENT_MARK) || (type == espeakEVENT_PLAY))
|
||||
ep->id.name = &namedata[value];
|
||||
else
|
||||
#ifdef deleted
|
||||
// temporarily removed, don't introduce until after eSpeak version 1.46.02
|
||||
if(type == espeakEVENT_PHONEME)
|
||||
{
|
||||
int *p;
|
||||
p = (int *)(ep->id.string);
|
||||
p[0] = value;
|
||||
p[1] = value2;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
ep->id.number = value;
|
||||
}
|
||||
} // end of MarkerEvent
|
||||
|
||||
|
||||
@@ -596,6 +610,9 @@ espeak_ERROR sync_espeak_Synth(unsigned int unique_identifier, const void *text,
|
||||
my_unique_identifier = unique_identifier;
|
||||
my_user_data = user_data;
|
||||
|
||||
for (int i=0; i < N_SPEECH_PARAM; i++)
|
||||
saved_parameters[i] = param_stack[0].parameter[i];
|
||||
|
||||
switch(position_type)
|
||||
{
|
||||
case POS_CHARACTER:
|
||||
@@ -769,13 +786,13 @@ ENTER("espeak_Initialize");
|
||||
|
||||
option_phonemes = 0;
|
||||
option_mbrola_phonemes = 0;
|
||||
option_phoneme_events = (options & 1);
|
||||
option_phoneme_events = (options & (espeakINITIALIZE_PHONEME_EVENTS | espeakINITIALIZE_PHONEME_IPA));
|
||||
|
||||
VoiceReset(0);
|
||||
// SetVoiceByName("default");
|
||||
|
||||
for(param=0; param<N_SPEECH_PARAM; param++)
|
||||
param_stack[0].parameter[param] = param_defaults[param];
|
||||
param_stack[0].parameter[param] = saved_parameters[param] = param_defaults[param];
|
||||
|
||||
SetParameter(espeakRATE,175,0);
|
||||
SetParameter(espeakVOLUME,100,0);
|
||||
@@ -1157,6 +1174,10 @@ ESPEAK_API espeak_ERROR espeak_Cancel(void)
|
||||
SHOW_TIME("espeak_Cancel > LEAVE");
|
||||
#endif
|
||||
embedded_value[EMBED_T] = 0; // reset echo for pronunciation announcements
|
||||
|
||||
for (int i=0; i < N_SPEECH_PARAM; i++)
|
||||
SetParameter(i, saved_parameters[i], 0);
|
||||
|
||||
return EE_OK;
|
||||
} // end of espeak_Cancel
|
||||
|
||||
|
||||
Reference in New Issue
Block a user