Struggling with Azure AI Speech SDK for your multilingual VOIP app? Learn which SDK object—SpeechSynthesizer, SpeechRecognizer, or TranslationRecognizer—is the key to real-time speech-to-text conversion in Python. Ace your AI-102 exam and build innovative AI solutions!
Table of Contents
Question
Your organization, Nutex Inc., is developing a multilingual application using Python that will be used internally for making VOIP calls. One of the key features of the application is converting audible speech in any language to text in real time, which will help with note-taking and documentation during calls. You have already installed the Speech SDK in your development environment and are ready to implement the speech-to-text functionality. You use the below code to convert speech from the microphone.
import azure.cognitiveservices.speech as speechsdk # Configure the translation recognizer speech_config = speechsdk.SpeechConfig(subscription="YourSubscriptionKey", region="YourRegion") audio_config = speechsdk.AudioConfig(use_default_microphone=True) # Initialize the recognizer recognizer = speechsdk.MISSING(speech_config=speech_config, audio_config=audio_config) print("Say something...") # Begin the speech recognition process result = recognizer.recognize_once() # Display the output of the recognized text if result.reason == speechsdk.ResultReason.TranslatedSpeech: print(f"Recognized text: {result.text}")
Which of the following is the missing SDK object used to convert the audible speech-to-text functionality?
A. SpeechSynthesizer
B. SpeechRecognizer
C. TranslationRecognizer
D. SpeechToText
Answer
C. TranslationRecognizer
Explanation
You would use the TranslationRecognizer SDK object in the given scenario. The TranslationRecognizer object is designed to convert speech to text while also translating it from one language to another. This is the correct object to use when you need to handle speech translation or convert speech to text in a multilingual scenario, such as in your VOIP application.
You would not use the SpeechRecognizer SDK object in the given scenario. The SpeechRecognizer object is used for basic speech recognition tasks, converting speech to text in the same language, not multiple languages. While useful for speech-to-text tasks, it does not provide translation capabilities.
You would not use the SpeechSynthesizer SDK object in the given scenario. The SpeechSynthesizer object is used for converting text to speech, essentially performing the opposite function of speech recognition. This object is not suitable for converting speech to text, as it is designed to generate spoken output from text.
You would not use the SpeechToText SDK object in the given scenario. SpeechToText is not a valid Azure Speech SDK object.
Microsoft Azure AI Engineer Associate AI-102 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Azure AI Engineer Associate AI-102 exam and earn Microsoft Azure AI Engineer Associate AI-102 certification.