Struggling with Azure AI Speech SSML configuration for satellite phone scenarios? Discover the correct voice name and telecom effect (eq_telecomhp8k) needed to ace this AI-102 exam question. Includes Python code samples and neural voice selection tips for Microsoft certification success.
Table of Contents
Question
Xerigon Corporation is creating a Python script that will use the text to speech capability of the Azure AI Speech service. The following script will be used by an application:
import azure.cognitiveservices.speech as speechsdk # Replace with your own subscription key and service region subscription_key = "YourSubscriptionKey" service_region = "YourServiceRegion" # Create a speech configuration speech_config = speechsdk.SpeechConfig(subscription=subscription_key, region=service_region) # Define the SSML content ssml_string = """ <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"> MISSING This is the text that is spoken. The brown fox jumps over the lazy dog </voice> </speak>""" # Create a speech synthesizer synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config) # Synthesize the SSML content result = synthesizer.speak_ssml_async(ssml_string).get() # Check the result if result.reason == speechsdk.ResultReason.SynthesizingAudioCompleted: print("Speech synthesized successfully.") elif result.reason == speechsdk.ResultReason.Canceled: cancellation_details = result.cancellation_details print(f"Speech synthesis canceled: {cancellation_details.reason}") if cancellation_details.reason == speechsdk.CancellationReason.Error: print(f"Error details: {cancellation_details.error_details}")
You want the synthesized voiced output to have the following characteristics:
- Have a male voice that sounds like an American
- Optimized to sound clearer to compensate for narrowband speech in global satellite phone scenarios
Which Speech Synthesis Markup Language (SSML) element attributes and values should be in the script?
A. <prosody name=”en-US-AndrewMultilingualNeural” pitch=”eq_telecomhp8k”>
B. <voice name=”en-US-AndrewMultilingualNeural” effect=”eq_telecomhp8k”>
C. <prosody name=”en-US-AndrewMultilingualNeural” pitch=”eq_car”>
D. <voice name=”en-US-AndrewMultilingualNeural” effect =”eq_car”>
Answer
B. <voice name=”en-US-AndrewMultilingualNeural” effect=”eq_telecomhp8k”>
Explanation
You would set the voice element attribute of name to en-US-AndrewMultilingualNeural as the voice that should be used.
You would choose the following in the script:
<voice name=”en-US-AndrewMultilingualNeural” effect=”eq_telecomhp8k”>
import azure.cognitiveservices.speech as speechsdk
# Replace with your own subscription key and service region
subscription_key = “YourSubscriptionKey”
service_region = “YourServiceRegion”
# Create a speech configuration
speech_config = speechsdk.SpeechConfig(subscription=subscription_key, region=service_region)
# Define the SSML content
ssml_string = “””
<speak version=”1.0″ xmlns=”http://www.w3.org/2001/10/synthesis” xml:lang=”en-US”>
<voice name=”en-US-AndrewMultilingualNeural” effect=”eq_telecomhp8k”>
This is the text that is spoken. The brown fox jumps over the lazy dog
</voice>
</speak>”””
# Create a speech synthesizer
synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config)
# Synthesize the SSML content
result = synthesizer.speak_ssml_async(ssml_string).get()
# Check the result
if result.reason == speechsdk.ResultReason.SynthesizingAudioCompleted:
print(“Speech synthesized successfully.”)
elif result.reason == speechsdk.ResultReason.Canceled:
cancellation_details = result.cancellation_details
print(f”Speech synthesis canceled: {cancellation_details.reason}”)
if cancellation_details.reason == speechsdk.CancellationReason.Error:
print(f”Error details: {cancellation_details.error_details}”)
You would specify the value of the attribute effect as eq_telecomhp8k. The effect attribute is used to optimize the speech quality to compensate for audio devices that might distort the voice. There are two values for the effect attribute:
- eq_car – This value optimizes high-fidelity speech for car radios and audio equipment in buses.
- eq_telecomhp8k – This value optimizes auditory experience for narrowband speech in telecom or telephone scenarios such as global satellite phones.
You would not use the prosody element in Speech Synthesis Markup Language (SSML). This element allows you to control the pitch of synthesized speech by adjusting the tonality of the computerized voice. The following code lowers the pitch of a synthesized voice by 30%:
<prosody pitch=”-30%”>This text will be spoken 30% lower.</prosody>
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.