developer_guide:voicexml_references:elements:prompt

< prompt >

The <prompt> element controls the output of synthesized speech and prerecorded audio.

NOTE:

Any prompts that contain Speech Markup (SSML) will be passed into the TTS Engine as an XML document. The interpreter first decodes the VoiceXML document, and then re-encodes the prompt content into an XML document to pass to the TTS Engine.

<prompt
bargein="true" | "false"
bargeintype="energy" | "speech" | "recognition"
cond="ECMAScript_Expression"
count="Integer"
timeout="time_interval">
child elements
</prompt>
bargeinThe bargein attribute enables user input during the prompt. This attribute is optional. \\ * true – the user input can barge-in the current prompt. Subsequent prompts in the queue will be treated as bargein=true.
* false – the user can’t barge-in to the prompt until the prompt has finished playing.
bargeintypeThe bargeintype attribute specifies the barge-in type:
* speech – any user utterance can barge-in during the prompt.
* hotword – only when user input matches a grammar can barge-in occur during the prompt.
condThe cond attribute is a Boolean expression that must evaluate to true for this prompt to be played. This attribute is optional and defaults to true.
countThe field item maintains a counter of the number of times the item has been visited. The count attribute allows the application to play different prompts based on the counter. The prompt will be played when the counter reaches the count attribute. This attribute is optional and defaults to 1.
timeoutThe timeout attribute is the time to wait before throwing a noinput event. This attribute is optional.
xml:langThe xml:lang attribute specifies the language and locale information of the VoiceXML document. If omitted, it will inherit this value from the document hierarchy, or ultimately from the platform default, which equates to 'en-US'. If text-to-speech is configured, the VoiceXML browser will make an HTTP request to get a wav or gsm file generated. The audio files generated could be cached to greatly reduce the text-to-speech access.
<block>, <catch>, <choice>, <error>, <field>, <filled>, <if>, <initial>, <menu>, <noinput>, <nomatch>, object>, <prompt>, <record>, <subdialog>
<audio>, <enumerate>, <value>, Speech Markup (SSML)
If xml:lang is equal to “video”, then the VoiceXML interpreter will use text-to-video to generate a static GIF file to the video silence. See Text-to-Video Option.
The attribute timeout has no effect.
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 <form>
  <field name="maincourse">
   <noinput> <reprompt/> </noinput>
   <nomatch> <reprompt/> </nomatch>
   <prompt count="1">Please select an entree.</prompt>
   <prompt count="2">Today, we're featuring:<enumerate/></prompt>
   <option dtmf="1" value="fish"> swordfish </option>
   <option dtmf="2" value="beef"> roast beef </option>
   <option dtmf="3" value="frog"> frog legs </option>
   <filled>
    <prompt>
     <value expr="maincourse"/>, good choice.
     Please enjoy your meal.
    </prompt>
    <submit next="maincourse.cgi"
     method="post" namelist="maincourse"/>
   </filled>
  </field>
 </form>
</vxml>
  • developer_guide/voicexml_references/elements/prompt.txt
  • Last modified: 2015/10/27 21:41
  • by borja