Ask Your Question
1

What is the process to adjust the duration of silence between groups of sentences in Azure Text to Speech?

asked 2023-06-30 16:26:20 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-30 16:34:01 +0000

nofretete gravatar image

The duration of silence between groups of sentences in Azure Text to Speech can be adjusted using the SSML (Speech Synthesis Markup Language) tags.

  1. Open a text editor and create a new document.

  2. Add the text you want to synthesize using the Text to Speech service.

  3. Use the <break> SSML tag to indicate the duration of the pause you want to insert. For example:

    <speak>Your text here. <break time="1s"/> More text here. </speak>

    In this example, a one-second pause is inserted between the two sentences.

  4. Save the file with a .xml extension.

  5. Upload the file to the Azure Text to Speech service.

  6. When using the service, include the SSML file in your request.

    For example:

    curl -v -X POST "https://<region>.tts.speech.microsoft.com/cognitiveservices/v1" \
    -H "Content-Type: application/ssml+xml" \
    -H "Authorization: Bearer $accessToken" \
    --data-binary @<filename>.xml \
    -o <filename>.wav
    

    Replace <region> with the Azure region you are using, $accessToken with your authentication token, <filename> with the name of your SSML file, and <filename>.wav with the name you want to give to your synthesized audio file.

    The audio file will contain the desired pauses between groups of sentences as specified in the SSML file.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-30 16:26:20 +0000

Seen: 10 times

Last updated: Jun 30 '23