BerriAI/litellm · error · AzureSpeechAudioTranscriptionException
Azure AI Speech transcription failed with RecognitionStatus=
Error message
Azure AI Speech transcription failed with RecognitionStatus={recognition_status}. What it means
Error "Azure AI Speech transcription failed with RecognitionStatus={recognition_status}." thrown in BerriAI/litellm.
Solutions
- Check the RecognitionStatus in the error; verify the audio format and language are supported by the endpoint.
- Confirm the speech resource region matches api_base.
When it happens
Trigger: Thrown at litellm/llms/azure/audio_transcription/transformation.py:132 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/cba445270f135583.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/azure/audio_transcription/transformation.py:132
audio_file: FileTypes,
optional_params: dict,
litellm_params: dict,
) -> AudioTranscriptionRequestData:
processed_audio: Final = process_audio_file(audio_file)
return AudioTranscriptionRequestData(
data=processed_audio.file_content,
files=None,
content_type=processed_audio.content_type,
)
def transform_audio_transcription_response(
self,
raw_response: httpx.Response,
) -> TranscriptionResponse:
response_json: Final = raw_response.json()
recognition_status: Final = response_json.get("RecognitionStatus")
if recognition_status is not None and recognition_status != "Success":
raise AzureSpeechAudioTranscriptionException(
message=(f"Azure AI Speech transcription failed with RecognitionStatus={recognition_status}."),
status_code=raw_response.status_code,
headers=raw_response.headers,
)
text: Final = self._extract_text(response_json)
response: Final = TranscriptionResponse(text=text)
response._hidden_params = response_json
return response
def get_error_class(self, error_message: str, status_code: int, headers: dict | httpx.Headers) -> BaseLLMException:
return AzureSpeechAudioTranscriptionException(
message=error_message,
status_code=status_code,
headers=headers,
)
def _resolve_stt_base_url(self, api_base: str) -> str:View on GitHub (pinned to 77b7c6c40c)