<prompt>

<prompt>

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

Attributes

NameData typeDescription

bargein

Boolean

(defaults to true) Controls whether a user can interrupt a prompt.

bargeintype

This attribute is not supported.

cond

String

(defaults to true) An expression that must evaluate to true after conversion to Boolean in order for the prompt to played.

count

Integer

(defaults to 1) A number that allows you to emit different prompts if the user is doing something repeatedly.

xml:lang

String

(defaults to “xml:lang” global property or the “xml:lang” attribute of the <vxml> tag) The language identifier as defined in RFC3066.

timeout

String

The timeout that will be used for the following user input.

Notes

None

Example

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <block>
      <prompt bargein="false">
        You have to wait until the end of this sentence
        before you'll be able to interrupt this prompt.
      </prompt>
    </block>
    <field name="myfield">
      <grammar type="application/x-jsgf">
        ( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "#" | "*" )+
      </grammar>
      <prompt bargein="true">
        Now you can press any DTMF button and the prompt will
        be interrupted.
      </prompt>
      <filled>
        <prompt>
          You entered <value expr="myfield"/>
        </prompt>
      </filled>
    </field>
  </form>
</vxml>

The output of the above script would be:

Computer: You have to wait until the end of this sentence… Human: (enters DTMF-1) Computer: (disregards input) Computer: …before you'll be able to interrupt the audio with DTMF. Computer: Now you can press any DTMF button and… Human: (enters DTMF-5) Computer: You entered five.

Child Tags

<audio>, <break>, <emphasis>, <enumerate>, <foreach>, <lexicon>, <mark>, <metadata>, <phoneme>, <prosody>, <sub>, <paragraph>, <say-as>, <sentence>, <speak>, <value>, <voice>

Parent Tags

<block>, <catch>, <error>, <field>, <filled>, <foreach>, <help>, <if>, <initial>, <menu>, <noinput>, <nomatch>, <record>, <subdialog>, <transfer>

Last updated