PRODUCTION SCENARIO
A Python app uses the Speech SDK to call recognize_once_async() from the default microphone. When the caller stays silent or the endpoint value is wrong, the result text is empty and the app crashes on it.
What should the app check before using the transcript?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: The result reason, handling NoMatch and Canceled separately
The quickstart branches on the result reason: RecognizedSpeech yields text, NoMatch means no speech could be recognized, and Canceled carries cancellation details whose error message points at a bad key or endpoint. Checking the reason first prevents using an empty transcript.