{"record":{"id":"6bb645ebf3fe06bc","repo":"BerriAI/litellm","slug":"azure-ai-speech-transcription-requires-a-cognitive","errorCode":null,"errorMessage":"Azure AI Speech transcription requires a Cognitive Services or STT Speech endpoint, not an Azure OpenAI endpoint.","messagePattern":"Azure AI Speech transcription requires a Cognitive Services or STT Speech endpoint, not an Azure OpenAI endpoint\\.","errorType":"validation","errorClass":"AzureSpeechAudioTranscriptionException","httpStatus":400,"severity":"error","filePath":"litellm/llms/azure/audio_transcription/transformation.py","lineNumber":163,"sourceCode":"            message=error_message,\n            status_code=status_code,\n            headers=headers,\n        )\n\n    def _resolve_stt_base_url(self, api_base: str) -> str:\n        api_base = api_base.rstrip(\"/\")\n        parsed_url: Final = urlparse(api_base)\n        hostname: Final = parsed_url.hostname or \"\"\n\n        if self._is_cognitive_services_endpoint(hostname=hostname):\n            region: Final = self._extract_region_from_hostname(hostname=hostname, domain=self.COGNITIVE_SERVICES_DOMAIN)\n            return self._build_stt_base_url(region=region)\n\n        if self._is_stt_endpoint(hostname=hostname):\n            return f\"{parsed_url.scheme}://{hostname}\"\n\n        if self._is_azure_openai_endpoint(hostname=hostname):\n            raise AzureSpeechAudioTranscriptionException(\n                message=(\n                    \"Azure AI Speech transcription requires a Cognitive Services \"\n                    \"or STT Speech endpoint, not an Azure OpenAI endpoint.\"\n                ),\n                status_code=400,\n            )\n\n        return api_base\n\n    def _is_cognitive_services_endpoint(self, hostname: str) -> bool:\n        return hostname == self.COGNITIVE_SERVICES_DOMAIN or hostname.endswith(f\".{self.COGNITIVE_SERVICES_DOMAIN}\")\n\n    def _is_stt_endpoint(self, hostname: str) -> bool:\n        return hostname == self.STT_SPEECH_DOMAIN or hostname.endswith(f\".{self.STT_SPEECH_DOMAIN}\")\n\n    def _is_azure_openai_endpoint(self, hostname: str) -> bool:\n        return hostname.endswith(\".openai.azure.com\")\n","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/azure/audio_transcription/transformation.py#L145-L181","documentation":"Error \"Azure AI Speech transcription requires a Cognitive Services or STT Speech endpoint, not an Azure OpenAI endpoint.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/azure/audio_transcription/transformation.py:163 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a Cognitive Services or STT Speech endpoint (e.g. https://{region}.stt.speech.microsoft.com), not the Azure OpenAI endpoint."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}