====== < choice > ====== ===== Description ===== The element defines a menu item and serves several purposes: * Specifies a speech grammar fragment and/or a DTMF grammar fragment that determines when that choice has been selected. * Forms the prompt string with its contents. * Specifies the URI to go to when the choice is selected. ===== Syntax ===== child elements ===== Attributes ===== |dtmf|This attribute is the DTMF sequence for this choice. This attribute is optional.| |accept|The accept attribute overrides the setting for the accepted attribute in the element, with either exact or approximate values. This attribute is optional and defaults to exact. * exact – use exact to define the exact phrase to be recognized. * approximate – use approximate to define an approximate recognition phrase. A subset of the words in the phrase expression can be matched. For example, "Hello world" can be matched with "Hello world", "Hello", or "World".| |next|The next attribute is the URI of the next dialog or document.| |event|This attribute throws a specified event. Next and expr attributes have precedence over this attribute.| |expr|The expr attribute is an ECMAScript Expression that defines the URI to transition. The next attribute has precedence over this attribute.| |fetchaudio|The fetchaudio attribute is the URI of the audio to play while waiting for the next document to be fetched.| |fetchtimeout|This attribute indicates the time interval to wait for an audio file to be fetched before playing the alternate content. This attribute is optional.| |fetchhint|The fetchhint attribute defines when the audio file should be retrieved. This attribute is optional. * prefetch - the file can be fetched when the document is loaded. * safe - the file is fetched only when needed.| |maxage|This attribute indicates the maximum time in seconds that this document will use this file before fetching another copy. This attribute is optional.| |maxstale|The maxstale attribute indicates the maximum time in seconds that this document will use the file that exceeded the maxage time. This attribute is optional.| ===== Parents ===== ===== Children ===== ===== Extensions ===== None. ===== Limitations/Restrictions ===== The dtmf attribute must be specified. ===== Example Code ===== What do you want for drink, coffee or tea? coffee tea Please say coffee or tea Please say coffee or tea
Ok, here's your coffee
Ok, here's your tea