@@ 132,12 132,13 @@ void speak(char *ssml, char *mark, char* fallback) {
}
void speak_text(char *text, espeak_PARAMETER param, int value) {
- if (param != 0) espeak_SetParameter(param, value, /* relative */1);
+ int curval = param != 0 ? espeak_GetParameter(param, 0) : 0;
+ if (param != 0) espeak_SetParameter(param, curval + value, /* relative */0);
int flags = espeakCHARS_AUTO | espeakPHONEMES | espeakENDPAUSE | espeakCHARS_UTF8;
espeak_Synth(text, strlen(text)+1, 0, POS_CHARACTER, 0, flags, NULL, NULL);
- if (param != 0) espeak_SetParameter(param, espeak_GetParameter(param, /* current */0), /* relative */0);
+ if (param != 0) espeak_SetParameter(param, curval, /* relative */0);
}
/* Utilities */