Tim Ward
Tim Ward

Reputation: 1

Speech service claimed Text-to-speech quotas says 200/sec I can't get higher than 20/min - 600 times slower

Using the Microsoft Speech SDK (Microsoft.CognitiveServices.Speech) 1.20.0 I am trying to implement the Azure Cognitive Services Text-to-speech as an upgrade from the Microsoft Speech Platform.

The documentation (https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-services-quotas-and-limits#text-to-speech-quotas-and-limits-per-resource) says 200 transactions per second but every time I test it starts rejecting at ~20/minute (600 times slower). This is on a the F0 free tier, although the standard tier also starts at 200/s.

Basic testing by creating a new SpeechSynthesizer then looping calling SpeakSsmlAsync it reliably fails at 20/min. Waiting on each call so should only be one concurrent connection. On the 21st call in a minute the result is Canceled and the error is BadRequest "Connection was closed by the remote host. Error code: 1007. Error details: Throttled due to too many requests USP state: 3. Received audio size: 0 bytes."

Upvotes: 0

Views: 1119

Answers (2)

Tim Ward
Tim Ward

Reputation: 1

I posted a query on the documentation here and it has now been updated to clarify the free (F0) service is limited to 20 per 60 seconds

Upvotes: 0

Utkarsh Pal
Utkarsh Pal

Reputation: 4544

As per my research, there is a latest official document from Microsoft on how to Lower speech synthesis latency using Speech SDK.

Normally, we measure the latency by first byte latency and finish latency.

The first byte latency is much lower than finish latency in most cases. The first byte latency is independent from text length, while finish latency increases with text length.

Ideally, we want to minimize the user-experienced latency (the latency before user hears the sound) to one network route trip time plus the first audio chunk latency of the speech synthesis service.

The solution supports C#, C++, Java, Python and Objective-C. I believe by implementing the given suggestions you may get some better results.

Upvotes: 0

Related Questions