mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-19 02:57:05 +00:00
Mark re-used phoneme_list as undefined
And fill the last phlist prepause and newword fields, otherwise they are detected as undefined: ==483407== Conditional jump or move depends on uninitialised value(s) ==483407== at 0x488E6AB: Generate (synthesize.c:1228) ==483407== by 0x488FD94: SpeakNextClause (synthesize.c:1587) ==483407== by 0x4887F56: Synthesize (speech.c:457) ==483407== by 0x488884C: sync_espeak_Synth (speech.c:570) ==483407== by 0x487B270: espeak_Synth (espeak_api.c:90) ==483407== by 0x10ACA0: main (espeak-ng.c:691) ==483407== Uninitialised value was created by a client request ==483407== at 0x4884893: MakePhonemeList (phonemelist.c:155) ==483407== by 0x4895712: TranslateClause (translate.c:2682) ==483407== by 0x488FCCF: SpeakNextClause (synthesize.c:1569) ==483407== by 0x4887F56: Synthesize (speech.c:457) ==483407== by 0x488884C: sync_espeak_Synth (speech.c:570) ==483407== by 0x487B270: espeak_Synth (espeak_api.c:90) ==483407== by 0x10ACA0: main (espeak-ng.c:691) ==483407== ==483407== Conditional jump or move depends on uninitialised value(s) ==483407== at 0x488E622: Generate (synthesize.c:1211) ==483407== by 0x488FD94: SpeakNextClause (synthesize.c:1587) ==483407== by 0x4887F56: Synthesize (speech.c:457) ==483407== by 0x488884C: sync_espeak_Synth (speech.c:570) ==483407== by 0x487B270: espeak_Synth (espeak_api.c:90) ==483407== by 0x10ACA0: main (espeak-ng.c:691) ==483407== Uninitialised value was created by a client request ==483407== at 0x4884893: MakePhonemeList (phonemelist.c:155) ==483407== by 0x4895712: TranslateClause (translate.c:2682) ==483407== by 0x488FCCF: SpeakNextClause (synthesize.c:1569) ==483407== by 0x4887F56: Synthesize (speech.c:457) ==483407== by 0x488884C: sync_espeak_Synth (speech.c:570) ==483407== by 0x487B270: espeak_Synth (espeak_api.c:90) ==483407== by 0x10ACA0: main (espeak-ng.c:691) ==483407== This is changing the ssml.test output, but with no audible difference, so this is probably a real fix for it.
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include "phoneme.h"
|
||||
#include "synthesize.h"
|
||||
#include "translate.h"
|
||||
#include "speech.h"
|
||||
|
||||
const unsigned char pause_phonemes[8] = {
|
||||
0, phonPAUSE_VSHORT, phonPAUSE_SHORT, phonPAUSE, phonPAUSE_LONG, phonGLOTTALSTOP, phonPAUSE_LONG, phonPAUSE_LONG
|
||||
@@ -147,6 +148,7 @@ void MakePhonemeList(Translator *tr, int post_pause, bool start_sentence)
|
||||
plist2 = ph_list2;
|
||||
phlist = phoneme_list;
|
||||
end_sourceix = plist2[n_ph_list2-1].sourceix;
|
||||
MAKE_MEM_UNDEFINED(&phoneme_list, sizeof(phoneme_list));
|
||||
|
||||
// is the last word of the clause unstressed ?
|
||||
max_stress = 0;
|
||||
@@ -557,13 +559,17 @@ void MakePhonemeList(Translator *tr, int post_pause, bool start_sentence)
|
||||
phlist[ix].length = post_pause; // length of the pause, depends on the punctuation
|
||||
phlist[ix].sourceix = end_sourceix;
|
||||
phlist[ix].synthflags = 0;
|
||||
phlist[ix].prepause = 0;
|
||||
phlist[ix++].ph = phoneme_tab[phonPAUSE];
|
||||
|
||||
phlist[ix].newword = 0;
|
||||
|
||||
phlist[ix].phcode = phonPAUSE;
|
||||
phlist[ix].type = phPAUSE;
|
||||
phlist[ix].length = 0;
|
||||
phlist[ix].sourceix = 0;
|
||||
phlist[ix].synthflags = 0;
|
||||
phlist[ix].prepause = 0;
|
||||
phlist[ix++].ph = phoneme_tab[phonPAUSE_SHORT];
|
||||
|
||||
n_phoneme_list = ix;
|
||||
|
||||
Reference in New Issue
Block a user