question

mrx-1438 avatar image
0 Votes"
mrx-1438 asked mrx-1438 commented

Text to Speech: imprecise Break times

Asking for 20second of pause in text->speech gives only 5s and 10s for this code:
I would expect 20s!

Tested on website and over python API
https://azure.microsoft.com/en-gb/services/cognitive-services/text-to-speech/#features


   <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-SaraNeural">
       <mstts:express-as style="cheerful">
         <prosody pitch="0%" rate="1" volume="100">
    
         One. 
         <mstts:silence  type="Sentenceboundary"  value="20s"/>
         Two.
    
         One. 
         <break time="20s"/>
         Two.
    
         </prosody>
       </mstts:express-as>
     </voice>
   </speak>


azure-text-analytics
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Even

One. <break time="5s"/> <break time="5s"/> <break time="5s"/> <break time="5s"/> Two.
creates 10,71sec break which makes no sense!

(One. Two. is 0.71sec, which is fine) but 10s/4 is 2.5s not 5s.


0 Votes 0 ·
GiftA-MSFT avatar image
0 Votes"
GiftA-MSFT answered

Hi, according to the documentation, the time value should be set less than 5,000 ms. Hope this helps.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

mrx-1438 avatar image
0 Votes"
mrx-1438 answered mrx-1438 commented

As you can see in my 2nd comment, 4x5000ms != 20sec but 10,71sec, which makes it useless.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your feedback. However, I wasn't able to reproduce the issue from your second comment. One. <break time="5s"/> <break time="5s"/> <break time="5s"/> <break time="5s"/> Two. precisely creates a total of 20s break as expected on my end.

0 Votes 0 ·

They seem to have changed something because now it works.

Hopefully it will stay this way.
Cheers!

0 Votes 0 ·