Azure Speech SDK: Continuous Speech Recognition Class

AI-901 By islever Editorial Last updated

Short answer

A Use the SpeechRecognizer class to capture audio from the default microphone and perform continuous speech-to-text transcription in Microsoft Foundry Tools.

Question

You are developing an application that continuously transcribes speech from a default microphone by using Azure Speech in Microsoft Foundry Tools.
You need to perform speech-to-text transcription from the microphone.
Which Python class should you use?
  1. SpeechRecognizer Correct Answer
  2. SpeechSynthesizer
  3. SpeechConfig
  4. AudioOutputConfig

Key Takeaways

The main trap is confusing SpeechRecognizer (input/transcription) with SpeechSynthesizer (output/synthesis) or SpeechConfig (setup only).

Learn which Python class to use for continuous speech-to-text transcription from a microphone in Microsoft Foundry. The correct answer is SpeechRecognizer, which handles real-time audio input and processing.

Common mistake: Selecting SpeechConfig because it seems fundamental; however, it only holds configuration details and cannot process audio streams on its own.

Expert Analysis

Continuous Speech Recognition The question requires a class that captures audio from the default microphone and performs real-time transcription. In the Azure AI Speech SDK, the SpeechRecognizer class is designed specifically for this purpose. It handles the audio input configuration (using AudioConfig.from_default_microphone_input) and manages the continuous stream of speech-to-text results.

Why Other Options Are Incorrect

  • SpeechSynthesizer: This class is used for text-to-speech synthesis (converting text to audio), not speech recognition.
  • SpeechConfig: This class is used to configure subscription keys, region, and other global settings. It is required to initialize a recognizer or synthesizer but does not perform the recognition itself.
  • AudioOutputConfig: This class is used to specify where synthesized audio should be played (e.g., default speaker or a file). It is irrelevant to speech input.

Key Distinction The core trap is confusing input/output directions. The question asks for "transcription" (speech to text), which is an input operation handled by SpeechRecognizer. Options B and D relate to output (audio generation/playback), while C is purely configurational.

Official Reference

Exam Strategy

When dealing with Azure AI services, always identify the direction of data flow. For 'recognition' or 'transcription', look for classes containing 'Recognizer'. For 'synthesis' or 'generation', look for 'Synthesizer'. Configuration classes like 'Config' are never the primary action handlers.

Frequently Asked Questions

What is the difference between SpeechRecognizer and SpeechSynthesizer?

SpeechRecognizer converts audio (speech) into text, while SpeechSynthesizer converts text into audio (speech). They serve opposite functions in voice applications.

Do I need AudioInputConfig for microphone transcription?

Yes, you typically pass an AudioConfig object created via AudioConfig.from_default_microphone_input() to the SpeechRecognizer constructor to define the audio source.

More AI-901 FAQ →

Community Votes

A
100%

100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 1 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 1

  1. GrandWizard_007 👍 1 Answered A
    You should use the SpeechRecognizer class to perform continuous speech‑to‑text transcription from the default microphone in Microsoft Foundry’s Azure Speech service. In the Azure Speech SDK for Python, the SpeechRecognizer class is responsible for: 1) Capturing audio from a microphone (audio_config) 2) Sending it to the Azure Speech service for real‑time recognition 3) Returning transcription results in real time

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All AI-901 Questions

Access 105 questions with complete answers and detailed explanations.

View Full AI-901 Practice Test →

← Back to AI-901 Study Guide