0

I am using Microsoft Speech Synthesis to play my SSML string using public Prompt SpeakSsmlAsync(string ssmlText); and i got a requirement where i should not use xml:langbut when i remove xml:lang attribute from the ssml string i am getting below exception

'speak' requires attribute 'xml:lang'

So is there a way that i can play my SSML string without using xml:lang attribute and let speech engine handle it ?

What i want to play but fails :

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis">
  helloo
</speak>

Working one with lang attribute:

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xm:lang="en-US">
  helloo
</speak>

Thanks in advance.

NDestiny
  • 1,133
  • 1
  • 12
  • 28
  • 2
    Where did you get the "requirement that should not use `xml:lang`"? According to the [W3C Standard](https://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#S3.1.2): > `xml:lang` is a **required attribute** specifying the language of the root document. – itminus Feb 11 '19 at 04:49
  • @itminus thanks, it is mandatory attribute. – NDestiny Feb 14 '19 at 15:30

0 Answers0