Reputation: 111
I am using Azure Speech Service CLI, to synthesize with a SSML file, but I get following error
CANCELED: Reason=Error
CANCELED: ErrorCode=ConnectionFailure
CANCELED: ErrorDetails=Connection was closed by the remote host. Error code: 1007. Error details: Data at the root level is invalid. Line 1, position 1. USP state: 3. Received audio size: 0bytes.
CANCELED: Did you update the subscription info?
I can use the synthesize with a text input and it works.
here is the SSML file I used (just the copy from doc):
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">
<voice name="en-US-AriaRUS">
This is the text that is spoken.
</voice>
</speak>
My account is using "F0".
Upvotes: 3
Views: 3491
Reputation: 79420
I had to basically include all these parts to get it to work:
const ssml = `<speak xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="http://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" version="1.0" xml:lang="en-US">
<voice name="hi-IN-AaravNeural">
<prosody rate="slow">
<phoneme alphabet="ipa" ph="${ipa}">${talk}</phoneme>
</prosody>
</voice>
</speak>`
Upvotes: 0
Reputation: 150
You need to correct the speak node. You missed xmlns:mstts="http://www.w3.org/2001/mstts"
<speak xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="http://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" version="1.0" xml:lang="en-US">
<voice name="en-US-AriaRUS">
<prosody rate="0%" pitch="0%">
This is the text that is spoken.
</prosody>
</voice>
</speak>
Upvotes: 2