Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.95k stars 1.86k forks source link

Language Identification Speech SDK: CANCELED: ErrorCode=ServiceTimeout #1487

Closed prims17 closed 2 years ago

prims17 commented 2 years ago

I'm trying to use the Language Identification feature. It is giving me this error : CANCELED: Reason=Error CANCELED: ErrorCode=ServiceTimeout CANCELED: ErrorDetails=Due to service inactivity, the client buffer exceeded maximum size. Resetting the buffer. SessionId: fe42336d7bf54c779c48d98a8b28046e

To Reproduce I need to transcode video to wav audio and then use Continuous Recognition to do the Language detection in my project. This was working fine until a week back. Now, I'm trying to do this for a French video, and it gives me 'en-us' as a result for one segment and it gets cancelled for the remaining segments, giving the above error. There is no issue with the subscription key I'm using.

Version of the Cognitive Services Speech SDK 1.20.0

Platform, Operating System, and Programming Language

Successfully transcoded audio for docId: The thread 0x5774 has exited with code 0 (0x0). The thread 0xa64 has exited with code 0 (0x0). The thread 0xef4 has exited with code 0 (0x0). The thread 0x5594 has exited with code 0 (0x0). The thread 0x4d14 has exited with code 0 (0x0). Speech recognized=en-us ... .... Pool AutoCad, SandboxInstance 5243e603-d197-47ce-99dc-b5b179596a88 reported as bad. HealthFailure: Failure: IdleTimeout; FailureMessage: Idle timeout (3600000ms) reached. Time since last process completed: 63787419931504.9ms; FailureTime: 5/6/2022 7:45:31 AM; Finished Health Check for pool AutoCad at 5/6/2022 7:45:31 AM UTC The thread 0xe30 has exited with code 0 (0x0). The thread 0x2f4 has exited with code 0 (0x0). The thread 0xc88 has exited with code 0 (0x0). The thread 0x5b88 has exited with code 0 (0x0). The thread 0x31f0 has exited with code 0 (0x0). The thread 0x6c0c has exited with code 0 (0x0). The thread 0x279c has exited with code 0 (0x0). The thread 0x6b20 has exited with code 0 (0x0). The thread 0x2158 has exited with code 0 (0x0). Speech recognized=es-es The thread 0x46d0 has exited with code 0 (0x0). The thread 0x68f8 has exited with code 0 (0x0). The thread 0x13b0 has exited with code 0 (0x0). The thread 0x6444 has exited with code 0 (0x0). CANCELED: Reason=Error CANCELED: ErrorCode=ServiceTimeout CANCELED: ErrorDetails=Due to service inactivity, the client buffer exceeded maximum size. Resetting the buffer. SessionId: fe42336d7bf54c779c48d98a8b28046e CANCELED: Reason=Error CANCELED: ErrorCode=ServiceTimeout CANCELED: ErrorDetails=Due to service inactivity, the client buffer exceeded maximum size. Resetting the buffer. SessionId: fe42336d7bf54c779c48d98a8b28046e The thread 0x5778 has exited with code 0 (0x0).

dargilco commented 2 years ago

Do you only need langauge identification or speech recognition with langauge identification? From the text above it sounds like you only need langauge identifcation. Make sure you study the samples here: https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/samples/csharp/sharedcontent/console/standalone_language_detection_samples.cs . Run the samples on your audio content (WAV file), after updating the list of source langauges.

What langauges are you trying to identify? French and English? Other langauges?

If the above does not help, please do the following:

  1. Share your C# code -- the parts that do Speech SDK stuff. Be sure to not reveal your speech key
  2. Take logs while doing a run that results in the error, and share the log file with us. See here for how to turn on logs: https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-use-logging Thanks, Darren
prims17 commented 2 years ago

Language identification or speech recognition with language identification? -Only Language for now. I'm using the continuous recognition sample as attached.

Sample runs correctly on .NET5 when simply using WAV audio. Issue arises when I integrate with my code base where I'm transcoding before detection.

What languages are you trying to identify? French and English? Other languages? - Testing against all M365 Tier list languages. LangSet1 = { "en-US", "es-ES", "ja-JP", "fr-FR", "de-DE", "pt-BR", "it-IT", "zh-CN", "nl-NL", "sv-SE" }; LangSet2 = { "da-DK", "fi-FI", "ru-RU", "nb-NO", "ko-KR", "zh-HK", "pl-PL", "tr-TR", "ar-BH" }; LangSet3 = { "pt-PT", "cs-CZ", "hu-HU", "th-TH", "id-ID", "el-GR", "sk-SK", "sl-SI" }; LangSet4 = { "ro-RO", "lt-LT", "bg-BG", "lv-LV" };

AutoLangIdHelper.txt

dargilco commented 2 years ago

Please provide Speech SDK logs taken while you run your code and see the error. Thanks!

prims17 commented 2 years ago

Attached the speech SDK logs. logs.txt

These are the console logs : console logs.txt

dargilco commented 2 years ago

Update: We are following up directly with @prims17 and the Microsoft service team to root-cuase the issue. We'll give update here when we have one.

dargilco commented 2 years ago

A service-side fix was made to address the issue. Thank you @prims17 for reporting this!