最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin8PV0评论

I'm using Azure text to speech service. I have a lot of small ssml files for which I generate the audio, then bine 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 plete, 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).

I'm using Azure text to speech service. I have a lot of small ssml files for which I generate the audio, then bine 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 plete, 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).

Share Improve this question asked Mar 9, 2021 at 8:12 otuswebotusweb 1,6781 gold badge21 silver badges33 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

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

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.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far