Silence can be added using AZURE text to speech by using the audio tag in the SSML (Speech Synthesis Markup Language) code. The audio tag syntax is as follows:
<break time="xms"/>
where x is the length of silence in milliseconds. For example, <break time="2000ms"/>
will add a 2-second pause in the speech output.
To implement this in AZURE text to speech, follow these steps:
<speak>
and <voice>
tags as required.synthesize
API to convert the SSML to audio.Here's an example of how to add a 2-second pause in AZURE text to speech output:
<speak version="1.0" xmlns="https://www.w3.org/2001/10/synthesis" xml:lang="en-US">
<voice name="en-US-JennyNeural">
Hello, this is an example of how to add a pause using Azure text to speech.
<break time="2000ms" />
Did you hear that pause?
</voice>
</speak>
When this SSML code is passed to the synthesize
API in AZURE text to speech, the output will contain a 2-second silence after the phrase "this is an example of how to add a pause using Azure text to speech."
Asked: 2022-08-14 11:00:00 +0000
Seen: 11 times
Last updated: Jan 23 '22