Azure Communication Services Speech Recognition Fails with Code 408 - Cognitive Services Timeout

Kaja Sherief 115 Reputation points
2025-04-09T10:46:25.5433333+00:00

I'm currently working with Azure Communication Services (ACS) Call Automation and facing an issue where speech recognition repeatedly fails with a 408 status code during live calls.

Important Context:

This service has been running successfully for 6–8 months, without any code changes on our end. The issue started happening recently, and no infrastructure changes were made either.

Setup Summary:

  • I'm using azsdk-python-communication-callautomation==1.2.0
  • Cognitive Services endpoint is linked and configured for speech recognition.
  • Prompt is played using TextSource, and start_recognizing_media() is used with:
  • RecognizeInputType.SPEECH,

initial_silence_timeout=15,

end_silence_timeout=0.3,

interrupt_prompt=True

  • Everything is running in a FastAPI server and using the ACS callback events. Issue Details: The recognition fails silently with the following log:
      WARNING - Recognition failed for call [ID]. Error: No error message  
    

Message: Action failed due to a request to Cognitive Services timing out. Please try again later or check for any issues with the service.
SubCode: 8565

  
  The ACS call logs show that the recognition request is **accepted (202)** and the task is **initiated**, but eventually it times out and triggers a `Microsoft.Communication.RecognizeFailed` event. Immediately after, the call disconnects.
  
  Here’s a snippet from the logs:
  
  yaml
  POST /api/callbacks HTTP/1.1" 200 OK  
...  
Recognition failed. Code: 408, Message: Action failed due to a request to Cognitive Services timing out...  
...  
Call disconnected for call ...
Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,241 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.