Browse Source

ssml: Avoid spurious voice change event

We should initialize current_voice_id so that ssml processing knows what
voice we currently have, and not try to change it unless really needed.
master
Samuel Thibault 8 months ago
parent
commit
87ebb9f0f4

+ 2
- 0
src/libespeak-ng/readclause.c View File

@@ -609,6 +609,8 @@ int ReadClause(Translator *tr, char *buf, short *charix, int *charix_top, int n_
xml_buf[n_xml_buf] = 0;
c2 = ' ';

if (base_voice.identifier)
strcpy(current_voice_id, base_voice.identifier);
terminator = ProcessSsmlTag(xml_buf, buf, &ix, n_buf, xmlbase, &audio_text, current_voice_id, &base_voice, base_voice_variant_name, &ignore_text, &clear_skipping_text, &sayas_mode, &sayas_start, ssml_stack, &n_ssml_stack, &n_param_stack, (int *)speech_parameters);

if (terminator != 0) {

+ 0
- 1
tests/ssml/external-entity.expected View File

@@ -1,5 +1,4 @@


hˈɪɹ ɑː͡ɹ ðə pˈæswɜːdz



+ 0
- 1
tests/ssml/spec-example-1.expected View File

@@ -1,6 +1,5 @@



juː hæv fˈɔː͡ɹ nˈuː mˈɛsɪd͡ʒᵻz

ðə fˈɜːst ɪz fɹʌm stˈɛfəni wˈɪljəmz ænd ɚɹˈa͡ɪvd æt

Loading…
Cancel
Save