otusweb
otusweb

Reputation: 1678

Azure Text to speech Throttled due to too many requests websocket error code: 1007 with only 3 concurrent requests

I'm using Azure text to speech service. I have a lot of small ssml files for which I generate the audio, then combine them using FFMPEG. I wrote a script to generate all the small audio files. If the script makes 3 concurrent requests, then after about a total of 20 requests, some of the other requests will complete, but the file will be empty. Checking the result object, I see Throttled due to too many requests websocket error code: 1007. If I remove any concurrency from the script and add a 1-second wait between the end of the last file and the next request, it works.

I've checked the quotas and limit on the Text to speech API and it mentions a maximum of 20 concurrent requests (which is far from the 3 I send).

Any idea about what I might be doing wrong (I'm using the javascript SDK).

Upvotes: 3

Views: 3628

Answers (2)

pawelofficial
pawelofficial

Reputation: 367

i am facing a similar issue - i am sending requests via python sdk to azure tts running on free demo subscription on free (F0) Pricing tier and i am being throttled even if i'm way below 20 requests.

A workaround i found is to set up second tts service on standard tier rather than free pricing tier.

Upvotes: 1

otusweb
otusweb

Reputation: 1678

Turns out on teh Rest API, in the free plan there is a 20 request per minute limit... https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-services-quotas-and-limits#text-to-speech-quotas-and-limits-per-speech-resource

Upvotes: 4

Related Questions