<record>

<record>

The <record> element is an input item that collects a recording from the user. A reference to the recorded audio is stored in the input item variable, which can be played back (using the expr attribute on <value>) or submitted to a server to be saved/processed.

Attributes

Notes

The current VoiceXML 2.0 Last Call specification is unclear as to the proper handling of DTMF keypresses that terminate a recording. Until further clarification is available, Plum DEV will handle terminating DTMF by writing the keypress into the shadow variable name$.termchar. Other shadow variables available for <record> are name$.duration, name$.size, and name$.maxtime. The name$.utterance, and name$.confidence shadow variables are not supported.

Example

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <record name="myrecording" beep="true">
      <prompt>
        Please record a message after the beep.
      </prompt>
      <filled>
        <prompt>
          You just recorded the following message: <value expr="myrecording"/>
        </prompt>
      </filled>
    </record>
  </form>
</vxml>

The output of the above script would be:

Computer: Please record a message after the beep. *BEEP* Human: My dog has fleas. Computer: You just recorded the following message: Computer: (Plays back the recording) “My dog has fleas.”

Child Tags

<audio>, <catch>, <enumerate>, <error>, <filled>, <grammar>, <help>, <noinput>, <nomatch>, <prompt>, <property>, <value>

Parent Tags

<form>

Last updated