def _get_speech_headers()

in function_app/src/components/speech.py [0:0]


    def _get_speech_headers(self) -> dict[str, str]:
        """Gets the headers for the Azure Speech API."""
        if self._azure_ad_token_provider is not None:
            return {
                "Accept": "application/json",
                "Authorization": f"Bearer {self._azure_ad_token_provider()}",
            }
        return {
            "Accept": "application/json",
            "Ocp-Apim-Subscription-Key": self._speech_key,
        }