diff --git a/src/libespeak-ng/phonemelist.c b/src/libespeak-ng/phonemelist.c index 7446ea30..4bd5c52f 100644 --- a/src/libespeak-ng/phonemelist.c +++ b/src/libespeak-ng/phonemelist.c @@ -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; diff --git a/tests/ssml.test b/tests/ssml.test index 7bb2435d..60adf5cb 100755 --- a/tests/ssml.test +++ b/tests/ssml.test @@ -39,8 +39,8 @@ test_ssml() { for i in `ls tests/ssml/*.ssml` ; do test_ssml $i; done for i in `ls tests/ssml/*.ssml2` ; do test_ssml $i punct; done -test_ssml_audio "" fcb28f00670959980038171ceda3c6bdec61b884 " Slow and low Fast and high." +test_ssml_audio "" 88fccb35536158f25f4ae44a03fb005fef95c99b " Slow and low Fast and high." # #410 is a bug in SSML. Sentence termination causes prosody stack to misfunction. -# Hash 00879af is the buggy version and should fail: -test_ssml_audio " bug #410" 00879aff11dc28a352736ca397ce9567e6f39029 " Slow and low. Fast and high." +# Hash 8d3bace is the buggy version and should fail: +test_ssml_audio " bug #410" 8d3bace9548ae73c4770a73c88c6f65e848b45cf " Slow and low. Fast and high." test_ssml_audio "