Description
A menu is a shorthand for a form containing a single anonymous field that prompts the user to make a choice and transitions to different places based on that choice. Menus can rely purely on speech, purely on DTMF, or both in combination.
Syntax
<menu
id="string"
scope="dialog" | "document"
accept="exact" | "approximate"
dtmf="boolean"
wakeupword="boolean">
child elements
</menu> |
Attributes
|
Attribute |
Description |
|
id |
The name of this menu. If specified, it can be
referenced within the same document or from another document.
For example, |
|
scope |
The scope of the menu's grammars. Optional. (Defaults to dialog.)
|
|
dtmf |
Enables DTMF input for all menu choices. See Limitation, below. Optional. (Defaults to true.)
|
|
accept |
Specifies how to generate the default grammar for each
|
|
wakeupword |
Specifies whether or not Wakeup Word Spotting should be used for input
in this menu. Overrides the value of the
|
Parents
Children
<audio>, <catch>, <choice>, <data>, <enumerate>, <error>, <help>, <noinput>, <nomatch>, <prompt>, <property>, <value>, #PCDATA
Extensions
wakeupword attribute.Limitations/Restrictions
dtmf attribute
is "true", and the interpreter-assigned dtmf inputs take precedence
over any dtmf inputs defined by grammars in the
<choice>s.
Example
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<menu>
<prompt> What do you want to drink, coffee or tea? </prompt>
<choice next="#getcoffee"> coffee </choice>
<choice next="#gettea"> tea </choice>
</menu>
<form id="getcoffee">
<block>
Ok, here's your coffee.
</block>
</form>
<form id="gettea">
<block>
Ok, here's your tea.
</block>
</form>
</vxml> |