aravind ks
aravind ks

Reputation: 694

Facing too much delay in microsoft-cognitiveservices-speech-sdk speech to text

I'm using the Azure AI Speech Service for speech-to-text functionality with the Microsoft Cognitive Services Speech SDK in Angular. However, I'm experiencing a significant delay in receiving the speech-to-text results. Upon inspecting the WebSocket connection, I noticed that the result is provided within 50 milliseconds; however, the recognizer delivers the result in the recognized event after 3 to 4 seconds.

Can anyone help me resolve this issue? Is there any configuration or step that I may have missed?

Upvotes: -3

Views: 66

Answers (1)

Sai Teja Yelubolu
Sai Teja Yelubolu

Reputation: 79

The delay in receiving speech-to-text results from the Azure Speech SDK could be due to several factors:

Recognition Mode: Use Interactive mode for real-time results instead of Dictation mode:

speechConfig.setProperty(SpeechSDK.PropertyId.SpeechServiceConnection_RecognitionMode, SpeechSDK.RecognitionMode.Interactive);

Use recognizeOnceAsync for faster results instead of continuous recognition:

recognizer.recognizeOnceAsync((result) => { console.log(result.text); });

Check Network Latency: Ensure a stable and low-latency connection to Azure servers.

Keep SDK Updated: Ensure you're using the latest version of the Speech SDK.

Reduce Event Handler Complexity: Avoid heavy logic in recognized event handlers that could introduce delays.

Upvotes: 0

Related Questions