Invalid xml with ssml in C#

133 views Asked by At

I am having a hard time trying to figure out how the xml is invalid for my ssml code within C#.

Here is the line of code in C#:

  synth.SpeakSsml("<speak version=\"1.0\" xmlns=\"http://www.w3.org/2001/10/synthesis\" xml:lang=\"en-US\">< voice gender=\"male\" age=\"15\" xml:lang=\"en-US\"><prosody contour=\"(0%,+20Hz) (25%,+20Hz) (50%,+20Hz) (75%,+20Hz)\" volume=\"100\">" + say + "</prosody></voice></speak>");

and the ssml:

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">
    < voice gender="male" age="15" xml:lang="en-US">
        <prosody contour="(0%,+20Hz) (25%,+20Hz) (50%,+20Hz) (75%,+20Hz)" volume="100">
              Text

    </prosody></voice></speak>

Thank you!

1

There are 1 answers

1
ParkerBidigare On

I figured it out! there is a space in the voice tag!