cognitive-services-speech-sdk: Service Timeout: Due to service inactivity, the client buffer exceeded maximum size. Resetting the buffer.

Describe the bug When using continuous speech translation there is an intermittent cancellation of the recognizer, stopping translation for that client. This is an intermittent occurrence that seems to happen rarely.

We are passing a real-time stream (using AudioInputStream) to the recognizer, so we’re not sure how the buffer is exceeding the maximum size as the rate shouldn’t exceed any possible window allocated by the recognizer.

To Reproduce Unknown, no behavior discovered yet that indicates what is required to reproduce consistently. It might be if the translator has been running continuous speech translation for too long, but I have seen instances longer running than the ones that it occurred in.

Expected behavior The client sdk should continue to recognize speech when passing in a real-time audio stream for any length of time.

Version of the Cognitive Services Speech SDK Java 1.28.0

Platform, Operating System, and Programming Language OS: Linux (Debian 11 docker container) x64 Client SDK: Java 1.28.0

Additional context

Region: eastus Session id: 80e2d12dc1c14edf92a87da4fba84707

(Please pm for specific azure project id if needed by azure team)

We unfortunately have not caught this error with full logging enabled, but will try to in the future to update here.

Stacktrace:

java.lang.Exception: Speech translation canceled.
  at com.microsoft.cognitiveservices.speech.util.EventHandlerImpl.fireEvent(Unknown Source)
  at com.microsoft.cognitiveservices.speech.translation.TranslationRecognizer.canceledEventCallback(Unknown Source)
Unexpected error message: [Speech translation canceled.]
Unexpected error details: [Due to service inactivity, the client buffer exceeded maximum size. Resetting the buffer. SessionId: 80e2d12dc1c14edf92a87da4fba84707]

I’ve seen mentions of ways to manually change the buffer size in the config for the recognizer. What would be a recommended size to try to mitigate this to happen at a lower rate, even if it doesn’t 100% fix it?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

@albseb511 could you open a new issue for that? That error string is coming from the speaker output in the JavaScript SDK and it’s going to be a different investigation, and we already have two separate issues comingled here.

Done.

https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues/2046

Hi @bobir01, you are correct. I removed the email from the message to prevent it from being scrapped.

@rhurey I got it, so did you mean sending the email to <redacting-email> in pm ? Did I understand it right?

yes

@bobir01, we’ve got the cause identified and are discussing the right long term solution.

If you could send me an email @microsoft.com (same alias) I may have a temporary solution you can try.

The problem you’re running into is a convergence of a very long phrase, pronunciation assessment, and single phrase recognition.

@Tryptophan the service fix should be rolling out now (It actually started earlier this week) and should greatly reduce the possibility of hitting this problem.

@bobir01, your timeout is a different root problem where the service isn’t segmenting the phrase as expected.