Struggling with SSML attributes in Azure AI? Discover how to configure name, role, and style in Speech Synthesis Markup Language for the AI-102 exam success.
Table of Contents
Question
Xerigon Corporation is building apps for the Marketing department that use the text to speech feature of the Speech Synthesis Markup Language (SSML) in Azure AI.
You want to create an SSML file for the app so that the voice profile imitates the voice of a middle-aged female and expresses a happy tone.
You create the following file:
<speak version=”1.0″ xmlns=”http://www.w3.org/2001/10/synthesis” xmlns:mstts=”https://www.w3.org/2001/mstts” xml:lang=”en-US”>
<voice A =”en-US-AvaMultilingualNeural”>
<mstts:express-as B =”OlderAdultFemale” C
=”cheerful”>
“Welcome to the West Cobb Health and Fitness club. How can I help you achieve your fitness goals?”
</voice>
</speak>>
Map the missing code to the appropriate letter.
Elements or attributes:
- pitch
- style
- styledegree
- name
- role
Answer
A. name
B. role
C. style
Explanation
The following specifies the name, role, and style for the voice element attribute.
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xml:lang="en-US"> <voice name="en-US-AvaMultilingualNeural"> <mstts:express-as role="OlderAdultFemale" style="cheerful"> “Welcome to the West Cobb Health and Fitness club. How can I help you achieve your fitness goals?” </voice> </speak>>
The voice element attribute of name specifies the voice that will be used. In this scenario, the female voice of Ava will be used to speak the US version of English.
The mstts:express-as element allows you to specify the following attributes:
- Role – Allows the voice to imitate a different age or gender, but the voice is not changed. If the voice is male, it will change the pitch and tone to imitate a female similar to male audiobook readers when they read a passage from a female character.
- Style – This element expresses emotion such as sadness, calmness, or cheerfulness.
- Styledegree – Increases or decreases the speaking style. For example, you can increase the sadness or cheerfulness in the voice.
You would not choose the styledegree attribute. This attribute adds intensity to the style attribute. For example, the following code uses the style=”cheerful” attribute to emphasize a positive or happy tone. The “styledegree=”2” attribute doubles the intensity of the positive tone to make the text sound more positive. The default value of the styledegree attribute is 1.
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xml:lang=" en-US "> <voice name=" en-US-AvaMultilingualNeural "> <mstts:express-as style="cheerful" styledegree="2"> to the West Cobb Health and Fitness club. How can I help you achieve your fitness goals?” </mstts:express-as> </voice> </speak>
You would not choose the pitch attribute. This attribute is not one of the mstts:express-as elements but rather the prosody element in Speech Synthesis Markup Language (SSML). This element allows you to control the pitch of the synthesized speech to adjust the tonality of the computerized voice. The following code lowers the pitch of a synthesized 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.