AI-901 Implement AI solutions with Microsoft Foundry MEDIUM
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.
Free

Keep practicing AI-901

undefined original AI-901 practice questions, each with an explanation and a source link. No account needed.

Start free practice set → Timed, explained, free