Speech-to-text initialization hanging

Ivan H 1 Reputation point
2021-09-16T09:03:20.693+00:00

Hi, I'm using speech-to-text services C++ SDK for Linux. I've build a test app following the guidelines from here:
https://video2.skills-academy.com/en-us/azure/cognitive-services/speech-service/get-started-speech-to-text?tabs=windowsinstall&pivots=programming-language-cpp
It works fine when subscription key is accepted but when there is some issue (e.g. error code 4 about running out of quota) it takes quite a long time (up to 10 seconds) to receive a response and my app freezes. If I move the logic to a separate thread it still causes freezing on the app exit and I receive an error code 6 ("Timeout while waiting for service to stop"). What is worse - sometimes I don't receive any response at all and therefore I need to force terminate my app as it sticks completely.
Is there any ability to reduce this delay? Could you please advise?

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

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.