|
Newsletters
|
|
|
|
|
Voice XML Reference
Voice XML Reference
Bookmark this page
The record Element - <record>
Description: The <record> element is a field item that collects a recording from the user. The recording is
stored in the field item variable, which can be played back or submitted to a server.
Example:
<?xml version="1.0"?>
<vxml version="1.0">
<form>
<record name="greeting" beep="true" maxtime="10s"
finalsilence="4000ms" dtmfterm="true" type="audio/wav">
<prompt> At the tone, please say your greeting.</prompt>
<noinput>I didn't hear anything, please try again.</noinput>
</record>
<field name="confirm" type="boolean">
<prompt>Your greeting is <value expr="greeting"/>.</prompt>
<prompt>To keep it, say yes. To discard it, say no.</prompt>
<filled>
<if cond="confirm">
<submit next="save_greeting.pl"
method="post" namelist="greeting"/>
</if>
<clear/>
</filled>
</field>
</form>
</vxml>
| Attributes |
| Name |
Value |
Description |
| name |
PCDATA |
The field item variable that will hold the recording. |
| expr |
PCDATA |
The initial value of the form item variable; default is ECMAScript
undefined. If initialized to a value, then the form item will not be
visited unless the form item variable is cleared. |
| cond |
boolean |
A boolean condition that must also evaluate to true in order for the form item to be visited. |
| modal |
boolean |
If this is true (the default) all higher level speech and DTMF
grammars are turned off while making the recording. If this is
false, speech and DTMF grammars scoped to the form, document,
application, and calling documents are listened for. Most
implementations will not support simultaneous recognition and
recording. |
| beep |
boolean |
If true, a tone is emitted just prior to recording. Defaults to false. |
| maxtime |
integer |
The maximum duration to record. |
| finalsilence |
integer |
The interval of silence that indicates end of speach. |
| dtmfterm |
boolean |
if true, DTMF keypress terminates recording. Defaults to true. The DTMF tone is not part of the recording. |
| type |
mime-type |
The MIME format of the resulting recording. Defaults to a platform specific format. |
Back to Tag Listing
|
|