6. What is spoken to the user by the following VoiceXML code?
<var name = "a" expr = "1"/>
<var name = "b" expr = "1"/>
<var name = "c" expr = "1"/>
<form id = “formB”>
<var name = "b" value = "3"/>
<field name = "fieldC">
<assign name = "a" value = "9"/>
<var name = "c" value = "5"/>
<filled>
<prompt>
Values at field level are
a = <value expr = "a"/>
b = <value expr = "b"/>
c = <value expr = "c"/>
</prompt>
</filled>
</field>
<filled>
<prompt>
Values at form level are
a = <value expr = "a"/>
b = <value expr = "b"/>
c = <value expr = "c"/>
</prompt>
</filled>
</form>
7. A <form> may contain which of the following elements as a direct child of the <form>?
8. What do <field>, <record>, <object>, <subdialog>, and <transfer> elements have in common?
9. Which two elements have an id attribute?
10. Given the following VoiceXML code:
<form>
<field name = "A” type = "digit"> <prompt> What is A? </prompt> </field>
<field name = "B" type = "digit"> <prompt> What is B? </prompt> </field>
<field name = "C" type = "digit"> <prompt> What is C? </prompt> </field>
<filled>
<if cond = "A > 5"> <clear namelist = "B C"/></if>
<if cond = "B > 3"> <clear namelist = "B"/></if>
</filled>
</filled>
This code will prompt the user to speak which of the following sequences of numbers?
11. Given the following code
<link event = "error.A">
<grammar version = "2.0" root = "game" type = "application/srgs+xml">
<rule id = "game">
<item> beanbag </item>
</rule>
</grammar>
</link>
<form>
<field name = "circus" >
<prompt>Do you want to throw a beanbag or softball?</prompt>
<grammar version = "2.0" root = "projectile" type= "application/srgs+xml">
<rule id = "projectile"> softball </rule>
</grammar>
</field>
</form>
How should the above code be modified so that a <nomatch> event is generated when the user speaks “beanbag”?
12. Given the following VoiceXML code that enables a user to either speak or enter values using DTMF:
<field name = "purchase">
<prompt> do you want to purchase item 25 or 53?</prompt>
<grammar version = " 2.0 " root = "product_dtmf" type = "application/srgs+xml" mode = "dtmf">
<rule id = "product_dtmf">
<one-of> <item> 2 5 </item> <item> 5 3 </item> </one-of>
</rule>
</grammar>
<grammar version = "2.0" root = "pruduct" type = "application/srgs+xml" mode = "voice">
<rule id = "product_speech">
<one-of>
<item> twentyfive <tag>$ = "25"</tag></item>
<item> fiftythree <tag>$ = "53"</tag></item>
</one-of>
</rule>
</grammar>
<filled>
<if cond = [_______]”>
<prompt> thanks for speaking the item number </prompt>
<else/><prompt> thanks for entering the item number </prompt>
</if>
</filled>
</field>
What should be placed in the blank to by saying thanks for speaking (if the user spoke) or entering (if the user used DTMF)?
13 What is the standard session variable for storing the ANI?
14. Given the following VoiceXML code:
<var name = "first_part" expr = "B" />
<field name = "second_part">
<grammar version = "2.0" root = "number" type = "application/srgs+xml" mode = "voice">
<rule id = "number">
<one-of> <item> 1 </item> <item> 2 </item> </one-of>
</rule>
</grammar>
<prompt> Say 1 or 2 </prompt>
<filled> [____] </filled>
</field>
Which of the following can be place into the [____] without resulting in an error?
15. Which two of the following result in a transfer to another document?
16. Given the following VoiceXML code, what must be inserted to guarantee that the parent_age is greater than the child_age?
<form>
<field name = "parent_age" type = "number ">
<prompt> What is the age of the parent? </prompt>
</field>
<field name = "child_age" type = "number">
<prompt> What is the age of the child? </prompt>
</field>
[_____]
</form>
17. Given the following code:
<form>
<field name = "parent_age" type = "number">
<prompt> What is the age of the parent? </prompt>
</field>
<field name = "child_age" type = "number">
<prompt> What is the age of the child? </prompt>
</field>
<filled> [_____] </filled>
</form>
Insert into the blank a <submit> element that sends both parent_age and child_age to the server and then transitions to library/application3.vxml
18. Given the following code:
<?xml version="1.0" encoding="UTF-8"?>
<ccxml xmlns="http://www.w3.org/2002/09/ccxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2002/09/ccxml http://www.w3.org/TR/ccxml/ccxml.xsd" version="1.0">
<var name = “voiceApp” expr = "'myApp.vxml'"/>
<eventprocessor>
<transition event = [_____] name = "evt">
<if cond = "evt.callerid == ‘tel:+8005551234' ">
<assign name = "voiceApp" expr = "'blocked.vxml'"/>
</if>
<accept connectionid = "evt.callid"/>
</transition>
<transition event = "connection.connected">
<dialogstart src = "voiceApp" />
</transition>
<transition event = "dialog.exit">
<exit/>
</transition>
</eventprocessor>
</ccxml>
Which event should be placed in the blank in order to determine whether to accept the call or to block the call?
19. Given the following CCXML code:
<?xml version="1.0" encoding="UTF-8"?>
<ccxml xmlns="http://www.w3.org/2002/09/ccxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2002/09/ccxml http://www.w3.org/TR/ccxml/ccxml.xsd" version="1.0">
<eventprocessor>
<transition event = "ccxml.loaded" >
<createcall dest = "'tel:8009999999'"/>
</transition>
<transition event = "[________]">
<dialogstart src = "voiceApp" />
</transition>
<transition event = "dialog.exit">
<exit/>
</transition>
</eventprocessor>
</ccxml>
What event should be placed in the blank space to trigger starting the dialog voiceApp?
20. Given the following VoiceXML code
<form id="call_transfer">
<transfer name="call_ajax" dest="tel:+18005559999" connecttimeout="30s" bridge="[_____]">
<filled>
<if cond="call_ajax == 'busy'">
<prompt>
The Ajax line is busy. Please call again later.
</prompt>
<elseif cond="call_ajax == 'noanswer'"/>
<prompt>
Ajax cannot answer the phone now. Please call again later.
</prompt>
</if>
</filled>
</transfer>
</form>
What is the value for the bridge attribute?
21. An application consists of
22. Which grammar matches exactly all of the following utterances?
the big book of poems
the small book of poems
the big book of verse
the small book of verse
23. Given the following grammar named itinerary.grxml :
<grammar version = "2.0" type = "application/srgs+xml" root = "flight" >
<rule id = "flight" >
From <ruleref uri = "#city1"/> to <ruleref uri = "#city2"/>
</rule>
<rule uri = "city1" scope = "public" >
<one-of>
<item> Chicago </item>
<item> Boston </item>
</one-of>
</rule>
<rule uri = "city2" >
<one-of>
<item> Alanta </item>
<item> Seattle </item>
</one-of>
</rule>
</grammar>
Which of the following are all of the legal references from within a VoiceXML application?
24. Given the following VoiceXML document:
<form id = "birthmonth">
<subdialog name="month_name" [________] />
</form>
…
<form id="get_month">
<field name = "month">
<prompt> What month? </prompt>
<grammar version = "1.0" type="application/srgs+xml" root = "month">
<rule id = "month">
<one-of>
<item>January</item>
…
<item>December</item>
</one-of>
</rule>
</grammar>
<filled>
<return namelist="month"/>
</filled>
</field>
</form>
What should be placed into the blank to invoke the get_month subdialog?
25. Given the following VoiceXML code fragment
<field name = "size" >
<grammar src = “size.grxml”/>
<prompt count = " [____] " > What size? </prompt>
<prompt count = " [____] " > What size? Small, medium, or large?</prompt>
</field>
What should be placed in the two boxes to specify a tapered (escalating) prompt?
26 Given the following code:
<vxml …>
[ A ]
<form ….>
<nomatch> Please try again </nomatch>
[ B ]
<field … >
[ C ]
</field>
<filled>
[ D ]
</filled>
</form>
</vxml>
Where should the following event handler be placed to override the event handler in the above VoiceXML code?
<nomatch> Do you want size small? Yes or no? </nomatch>
27 Which of the following generates a user-defined event?
28 Given the following code:
<form id = "questionnaire">
<catch event = "noinput">
<prompt> Catch message 1.</prompt>
</catch>
<field name = "question1" type = "number">
<prompt> Question 1? </prompt>
<catch event = "noinput">
<prompt> Catch message 2.</prompt>
</catch>
</field>
<field name = "question2" type = "number" >
<prompt> Question 2?</prompt>
</field>
</form>
Which of the following dialogs can be produced by the above VoiceXML code?
29. Which of the following segments will produce the following output to a log?
value of quantity is 13
30. Which of the following rules recognizes a three-digit number where each digit has the value of either “333” or “555”
31. Given the following SRGS rules:
<rule id = "size" >
<one-of>
<item> small </item>
<item> medium</item>
<item> large</item>
</one-of>
</rule>
<rule id = "drink" >
<one-of>
<item> orange juice </item>
<item> milk</item>
<item> soda</item>
</one-of>
</rule>
and the utterance
large soda
Which grammar root rule matches the utterance?
32. Given the following grammar rule:
<rule id = "size" >
<item repeat = "0-2" > very </item>
<one-of>
<item> red</item>
<item> green</item>
<item> blue</item>
</one-of>
</item>
balloon
</rule>
Which of the following input produces the associated output?
Speech input Output
33. Which rule accepts each of the following speech inputs and produces the associated output?
Speech input Output
blue produces blue
green blue produces green blue
blue green produces blue green
34. What will the following VoiceXML code produce?
<audio src= "warning.wav" >This is a warning</audio>
35. Given the VoiceXML fragment
<prompt>
Hello <break/>my name is Ann.
</prompt>
Insert a SSML to slow the speech by 10 percent.
36. Given the following VoiceXML code:
<object name = "voice_message" classid = "method://send" data = "messasge" type = "audio/x-wav"/>
[_________]
</object>
Which code fragment allows you to pass the variable “to” to the object?
37. Given the following ECMAScript
<script>
<![CDATA[
var a = "17";
]]>
</script>
Which of the following presents the user with the contents of the variable?
38. Given the VoiceXML code
<menu>
<prompt> stock quotes or airport codes? </prompt>
<choice next = "stock_quote.vxml" [_____] > stock quotes </choice>
</menu>
What goes in the blank so the stock_quote.vxml file is downloaded into the cache when it is required, possibly causing a delay in the user interface?
39. What is the result if the user responds with “9” to the first prompt?
<form>
<field name = "A" type = "number"> <prompt> What is A? </prompt> </field>
<field name = "B" type = "number"> <prompt> What is B? </prompt> </field>
<filled>
<if cond = "A > 5"> <clear namelist = "B"/></if>
</filled>
</form>
40. Given the following grammar expressed using the XML format:
<item repeat="0-1">
<item repeat="0-1"> very </item>
big
</item>
pizza
<item repeat="0-">
<item repeat="0-1">
<one-of>
<item>with</item>
<item>and</item>
</one-of>
</item>
<ruleref uri="#topping"/>
</item>
What is the equivalent grammar expressed using the ABNF format?
41. What is the purpose of the fetchaudiominium property?
42. What is the equivalent of the following ABNF grammar expressed in the XML format?
Michael | Yuriko | Mary | Duke | $otherNames
43. Consider the following VoiceXML code
1. <vxml xmlns="http://www.w3.org/2001/vxml" version = "2.0">
2. <form>
3. <field name = "A" type = "number"> <prompt> What is A? </prompt> </field>
4. <field name = "B" type = "number"> <prompt> What is B? </prompt> </field>
5. <filled>
6. <if cond = "A > 5">
7. <next goto = "continue"/>
8. <else> <clear namelist = “A”/>
9. </if>
10. </filled>
11. </form>
12. </vxml>
What line must be changed so that A will have value greater than 5 when control proceeds to “continue”?
44. The purpose of a mixed initiative dialog is to
45. During a mixed initiative dialog, the semantic interpretation language is used to
46. Given the following VoiceXML code:
<form id = "gadget">
<field name = "size" type = "digits">
<filled>
<if cond = "size == '3'"> <assign name = "size" expr = "4" /> </if>
<if cond = "size == '5'"> <clear namelist = "size"/> </if>
</filled>
</form>
Which of the following is a legal sequences of utterances that may be spoken by the user?
47. Which rule recognizes all three of these phrases?
a sweet candy bar
a big sweet candy bar
a big big sweet candy bar
48. Which of the following elements have field input variables?
49. Given the following VoiceXML code:
<form id = "get_data">
<field name = "account_number" type = "digits">
<prompt> What is your account number?</prompt>
</field>
<catch event = "nomatch">
<prompt>I did not hear you. </prompt>
<reprompt/>
</catch>
</form>
Which of following is a legal dialog?
50. Which of the following <grammar> elements is correct?
51. Which of the following elements may contain a <rule> element?
52. Which of the following will transfer control to the form with id = "get_more_data"?
53. Write VoiceXML code to perform the following translation
Current value of variable destination | Revised value of variable destination |
---|---|
big apple | NYC |
new york | NYC |
new york city | NYX |
(all other values) | UNKNOWN |
54. What does the grammar attribute modal = "true" imply?
55. Which of the following enables the user to barge in after a complete match of an active grammar?
56. What is the purpose of the transferaudio attribute of the <tranfer> element?
56. Given the following VoiceXML element
<record name = "msg" beep = "true" maxtime = "5s" finalsilence = "5000ms" dtmfterm = "true" type = "audio/x-wav"/>
where is the audio collected from the user stored?
59. Rewrite the following <prompt> so there is a pause between "bank" and "Do".
60. What will happen if the sensitivity is set to value 1.0?
61. What is the purpose of the incompletetimeout property?
62. What is the purpose of the <speak> element?
63. Write a prompt element that presents the message "Welcome Mr. Brown only if the gender is “male” and the age is greater than 20.
© 2002 Larson Technical Services