TTS Error of Timeout while synthesizing a small text

David 0 Reputation points
2024-02-20T23:52:04.8066667+00:00

I was doing TTS using Azure speech API. Each text file is not large, generally 500 words converting within around 2 minute voice. I got 10~15 text files in total. During the conversion, I got 3~4 errors which are in the same type of Speech synthesis canceled: CancellationReason.Error. Error details: Timeout while synthesizing. Current RTF: 2.00423 (threshold 2), frame interval 3471ms (threshold 3000ms). USP state: ReceivingData. Received audio size: 15552 bytes. It seems the timeout is due to the RTF and frame interval threasholds. I did search the solution, but it seems there's no option to adjust these 2 threasholds. Everything in my code was very basic just using the the Azure demo code. Can anyone provide the explantion why it was happening and how to sovle it?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,061 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VasaviLankipalle-MSFT 18,676 Reputation points Moderator
    2024-02-21T00:35:40.1333333+00:00

    Hello @David , Thanks for using Microsoft Q&A Platform.

    May I know the pricing tier of the speech resource you are working on?

    For the standard pricing tier, you can try increase concurrent request limit.

    Otherwise try to follow the best practices to mitigate throttling. If thresholds are exceeded, the speech synthesis service may cancel the synthesis process and return an error. Control the service responses and implement the logic that falls back (reduces the load) if you get too many requests (response code 429).

    For example, retry the load increase in one minute, and if it still doesn't work, try again in two minutes. Use a pattern of 1-2-4-4 minutes for the intervals. Break up your text files into smaller chunks. Increase the amount of time allowed for speech synthesis.

    The Text to speech quotas and limits per resource are listed here:

    User's image

    I hope this helps.

    Regards,

    Vasavi

    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.