How do adjust prosody in multilingual Text to speech?

Adrian Fiorito 20 Reputation points
2023-10-12T13:44:11.36+00:00

I'm using Azure Text to speech to generate audio with SSML.
I want to be able to generate audio for sentences like:

<lang xml:lang="en-US">
Now, let's use "water" in a sentence. "I want some water" is: </lang>
<prosody rate="-20%">
  <lang xml:lang="ja-JP">水が欲しいです</lang>
</prosody>

Where the japanese word is read slower.

However, according to https://learn.microsoft.com/en-us/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-speaking-languages,

"The <lang xml:lang> element is incompatible with the prosody and break elements. You can't adjust pause and prosody like pitch, contour, rate, or volume in this element."

Is there any work around or some other way to make the Japanese voice speak slower?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,469 questions
{count} votes

Accepted answer
  1. dupammi 7,745 Reputation points Microsoft Vendor
    2023-10-17T12:00:08.6666667+00:00

    Hi @Adrian Fiorito ,

    Thank you for reaching out to Microsoft Q&A.

    Following up to see my above "comment" answer for the weird issue of "Japanese part being said twice", helps by checking the comments section of this thread. Do let us know if you have any queries.

    To reiterate the resolution here, let me jot down the gist of my comment answer for your second question.

    To resolve this issue of voice being told twice, you've correctly removed the <break> tag. This confines the pause instruction doesn't affect the Japanese part.

    Another solution that I repro here is, if you move the <break> tag inside the [mstts:prosody] tag, it becomes a part of the prosody instructions and doesn't act as a global pause.

    For a working sample python code and documentation, please refer comments section of this thread.

    Please 'Accept as answer' and ‘Upvote’ if it helped, so that it can help others in the community looking for help on similar topics.

    0 comments No comments

0 additional answers

Sort by: Most helpful