Get default rate of words per minute for text to speech synthetizer for configured SpeechConfig

Anna Dřevíkovská 1 Reputation point
2022-10-06T14:34:56.587+00:00

Hi,

is it possible to get default speech rate in words per minute or something similar from the Java Speech SDK when using SpeechConfig and SpeechSynthesizer when using SpeakTextAsync for text-to-speech services?

We'd like to display for user a rough estimate of how much time it's going to take to finish the text-to-speech audio file.

Thank you for your answer.

Kind Regards,
Anna Drevikovska

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,645 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 48,911 Reputation points Microsoft Employee Moderator
    2022-10-07T07:16:29.733+00:00

    @Anna Dřevíkovská I think you should be able to get the duration of the audio file by using the SpeechSynthesisResult.getAudioLength() method. This will be accessible after the synthesis is complete. This should also give you the exact duration of the audio file generated. I hope this helps!!

    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.


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.