Topics

[espeak-ng:master] reported: Position parameter of espeak_Synth doesn't work properly #github


espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #861 Position parameter of espeak_Synth doesn't work properly
By jaacoppi:

Looks like POS_CHARACTER makes the speech start from the next full word after position X. See this:

#include <string.h>
#include <espeak-ng/espeak_ng.h>

static void say(char *text, int index) {
    espeak_Synth(text, strlen(text) +1, index, POS_CHARACTER, 0, espeakCHARS_AUTO,
                 NULL, NULL);
    espeak_Synchronize();
}
int main() {
    espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 0, NULL, 0);
    say("This starts from the 2nd word - starts.", 4);
    say("This starts from the 3rd word - from.", 8);
    say("This starts from the 4rd word - the.", 13);

}


The reason is here: https://github.com/espeak-ng/espeak-ng/blob/9e9c0a042b23d1b0ecd9871b5b60d56e9aeeca2f/src/libespeak-ng/readclause.c#L676-L683

It's clearly intended behaviour, but is it a good idea? I think not, it should break the word and start from the character position indicated.


espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #861 Position parameter of espeak_Synth doesn't work properly
By dieggsy:

Oh, thanks for the explanation. Interesting. Weird. It should at least the very least be documented more clearly if not changed.