Share via

Speech synthesis failed

Mounica T 20 Reputation points Microsoft Employee
2024-09-09T06:05:19.0833333+00:00

Speech synthesis failed - Error code: 1007. Error details: Speak node can only be the root. USP state

SSML - "\u003cspeak version="1.0" xml:lang="en-US" xmlns:mstts="http://www.w3.org/2001/mstts" xmlns="http://www.w3.org/2001/10/synthesis"\u003e\u003cvoice name="en-US-AvaMultilingualNeural" xmlns=""\u003e\u003cprosody rate="20%" pitch="0%"\u003e\u003cspeak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"\u003e\u003cvoice name="en-US-AvaMultilingualNeural"\u003e\r\nThis is the third question that is asked.\r\n\u003c/voice\u003e\u003c/speak\u003e You can say english, or hindi.\u003c/prosody\u003e\u003c/voice\u003e\u003c/speak\u003e"

Azure AI Speech
Azure AI Speech

An Azure service that integrates speech processing into apps and services.


Answer accepted by question author
  1. navba-MSFT 27,620 Reputation points Microsoft Employee Moderator
    2024-09-09T11:58:45.0733333+00:00

    @Mounica T The error you’re encountering, “Speak node can only be the root,” is due to the incorrect nesting of <speak> elements. In SSML (Speech Synthesis Markup Language), the <speak> element must be the root element and cannot be nested within other elements.

    Here’s a corrected version of your SSML:

     <speak version='1.0' xml:lang='en-US' xmlns:mstts='http://www.w3.org/2001/mstts' xmlns='http://www.w3.org/2001/10/synthesis'>
           <voice name='en-US-AvaMultilingualNeural'>
             <prosody rate='20%' pitch='0%'>
               This is the third question that is asked. 
              </prosody>
           </voice>
          <voice name='en-US-AvaMultilingualNeural'>
                 You can say English, or Hindi.
          </voice>
         </speak>
    

    Hope this answers.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.