question

tges-2805 avatar image
0 Votes"
tges-2805 asked tges-2805 commented

Controlling speech pace dynamically

Hi all,

I'm trying to control my speech pace (making it faster or slower) dynamically in my program. Is there any way to do it without using an SSML file?
I'm using Java for Android.

Thanks in advance.

azure-speech
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.

1 Answer

romungi-MSFT avatar image
0 Votes"
romungi-MSFT answered tges-2805 commented

Yes, the audio quality on 48k will be higher. This is basically a difference in the bitrate and encoding type, so exporting a higher quality audio will definitely help in the quality of the videos. The supported audio formats are also listed here. You can use tools like audacity to check the difference of quality in these formats.

If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.


· 4
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.

Hi,

First of all - thank you for the answer. I was looking into the documentation and I saw that the rate attribute is not available for Java (Correct me if I'm wrong). I'm using 2 objects in my code - SpeechConfig and SpeechSynthesizer. Is there any way to set the rate with one of the two? If not, how would you approach it?

Thanks!

0 Votes 0 ·

With the SpeechSynthesizer you should be able to control the rate with java. Please look at this example using SpeakSsmlAsync()
The option to use for rate is

 <prosody rate="+100.00%">

This indicates twice the speed. Similarly you can change increase or decrease the value. If you would like to build an SSML I would recommend using Azure speech studio Audio content creation tool as reference and then control the different attribute values programmatically in your application and replace them in the SSML before calling SpeakSsmlAsync().


1 Vote 1 ·

@tges-2805 Did you get a chance to try using the SSML to control the speed?

0 Votes 0 ·

Yes. It did work - thank you for your help! Though I really wished Azure would make a method so we can set the pace through code, with using SSML

0 Votes 0 ·