0
votes

I need to use the neural tts service by azure in a c# desktop batch command line to convert several text file messages to wav files.

The messages are generally short but the text files are many.

here the datails about the limits:

(Text-to-Speech Quotas and limits per Speech resource) https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-services-quotas-and-limits#text-to-speech-quotas-and-limits-per-speech-resource

No multithading or async request in this case.

Becouse my app convert in batch the text in wav is not clear what happan when exceeds the 20 requests per minute.

Will be a runtime error ? I need do manage the delay manually in my code ?

Thanks !

2

2 Answers

1
votes

When you exceed the request per minute limit you will receive response as 429 to every request. You could handle for this response.

You could delay and retry the request based on the above response.

1
votes

You might also look at the speech command line tool.

https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/spx-basics

spx synthesize --files .txt;.ssml --audio output {id}.wav

This should allow you to process many files on one connection, rather than starting and stopping an engine for each file.

You could also try to modify your batch script code as well, to reuse one connection rather than putting sleeps in-between creating new engine objects and new connections to the servicw in order to stay under the 20 QPS limit...