Azure text-to-speech - customize silence time

Tal Florentin 26 Reputation points
2022-03-16T15:17:45.487+00:00

I'm working with the cognitive sciences - speech studio.
I'd like to customize the gaps (silence time) that are used after a period, a comma, colon, hyphen, etc.
Is there a way to do so?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,069 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,628 questions
0 comments No comments
{count} votes

Accepted answer
  1. YutongTie-MSFT 53,971 Reputation points Moderator
    2022-03-17T17:07:32.733+00:00

    @Tal Florentin

    There is a 'SetProperty' method on the config to allow you to set parameters to your request, which can change the default silence time:
    (in C#: https://learn.microsoft.com/en-us/dotnet/api/microsoft.cognitiveservices.speech.propertycollection.setproperty?view=azure-dotnet)

    This way you can set the EndSilenceTimeout (PropertyIDs in C# as below document:
    https://learn.microsoft.com/en-us/dotnet/api/microsoft.cognitiveservices.speech.propertyid?view=azure-dotnet)

    Hope this helps!

    Regards,
    Yutong

    -Please kindly accept the answer if you feel helpful, thanks.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Tal Florentin 26 Reputation points
    2022-03-16T21:55:49.88+00:00

    Thanks for the response.

    Actually, I'm looking for something else:
    I'd like to change the default silence that the system currently has for the punctuation.
    For example, if when putting a period at the end of the sentence - the silence time is 0.5 second, I'd like to change it to 0.4 or so
    and make it affect the whole audio accordingly.

    Is there a way to do that?

    1 person found this answer helpful.

  2. YutongTie-MSFT 53,971 Reputation points Moderator
    2022-03-16T21:14:40.623+00:00

    Hello @Tal Florentin

    Sure, we can do it by SSML. There are two kind of pause, silence and break. The difference between mstts:silence and break is that break can be added any place in the text. Silence only works at the beginning or end of input text or at the boundary of two adjacent sentences. Please follow below guidance regarding to your need:

    Add silence: https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-synthesis-markup?tabs=csharp#add-silence

    Add break: https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-synthesis-markup?tabs=csharp#add-or-remove-a-break-or-pause

    Hope this helps!

    Regards,
    Yutong

    -Please kindly accept the answer if you feel helpful, thanks.

    0 comments No comments

Your answer

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