Hello Bruce !
Thank you for posting on Microsoft Learn.
I think this isn’t your key/region or the Speech service. It’s an Android-emulator-side network/TLS problem that started showing up on recent AVD images.
I found in this old thread, that several connection issues in older SDKs were fixed many people stuck on old versions saw identical failures until they upgraded.
https://learn.microsoft.com/en-us/azure/ai-services/speech-service/releasenotes
If you’re on a very new preview image (API 36/preview), try API 34 (Android 14) as a control. Google lists frequent emulator networking regressions; a fresh image + cold boot often clears them. https://developer.android.com/studio/run/emulator-troubleshooting
You need to make sure that the emulator can handshake TLS to Speech Open Chrome inside the emulator and hit https://<your-region>.stt.speech.microsoft.com/
(or the URL your logs show). You should at least get a 404/landing page over HTTPS. If even that can’t load, you’re looking at emulator DNS/proxy/cert issues and not your app.
If you’re on a corporate network / SSL inspection Emulators don’t automatically trust your organization’s proxy CA. Do BOTH of these for debug runs:
- Install the proxy/root CA into the emulator (Settings - Security - Encryption & credentials - Install a certificate - CA certificate).
https://docs.mitmproxy.org/stable/howto/install-system-trusted-ca-android/
https://docs.proxyman.com/debug-devices/android-device
Tell your app to trust user CAs in debug builds with a Network Security Config:
AndroidManifest.xml
(debug only):
<application android:networkSecurityConfig="@xml/network_security_config" ... />
res/xml/network_security_config.xml
:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<debug-overrides>
<trust-anchors>
<certificates src="user"/>
</trust-anchors>
</debug-overrides>
</network-security-config>
If you must traverse an HTTP proxy, set it explicitly on the Speech SDK before creating the recognizer:
speechConfig.SetProxy("proxy.mycorp.local", 8080); // or
speechConfig.SetProxy("proxy.mycorp.local", 8080, "user", "pass");