Here are all the actual test exam dumps for IT exams. Most people prepare for the actual exams with our test dumps to pass their exams. So it's critical to choose and actual test pdf to succeed.

Exam AI-901 Topic 1 Question 53 Discussion

Actual exam question for Microsoft's AI-901 exam
Question #: 53
Topic #: 1
You are developing a voice application that listens for spoken commands and converts them into text by using Azure Speech in Foundry Tools.
How should you complete the Python code? To answer, select the appropriate option in the answer area.
NOTE: Each correct selection is worth one point.

Suggested Answer:


Explanation:

The correct Python method is:
recognizer.recognize_once()
Completed code:
import azure.cognitiveservices.speech as speechsdk
speech_config = speechsdk.SpeechConfig(subscription=key, region=region) recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config) recognizer.recognize_once() Microsoft's Azure Speech documentation for Foundry Tools explains that Speech to text is used for real-time speech recognition and converting spoken audio into text. The Python Speech SDK uses a SpeechRecognizer object for recognition from audio input, such as a microphone.
Why the other options are incorrect:
recognizer.speak_text_async( " Ready " ) is incorrect because speaking text is text-to-speech, not speech-to- text recognition.
recognizer.start_continuous_recognition() can be used for continuous recognition, but the code shown is asking for the basic method to recognize spoken input and convert it to text from the SpeechRecognizer.
recognizer.start_keyword_recognition() is used for keyword/wake-word recognition, not general speech-to- text transcription of spoken commands.
Therefore, the correct answer is:
recognizer.recognize_once()

by Zoe at Sep 28, 2026, 06:49 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.