Collects a recording from the user. A reference to the recorded audio is stored in the form item variable, which can be played back or submitted to a server. The <record> element can be used similarly to record a video file (see types below).
<record
name="string"
expr="ECMAScript_Expression"
cond="ECMAScript_Expression"
modal="boolean"
beep="boolean"
maxtime="time_interval"
mintime="time_interval"
timeout="time_interval"
finalsilence="time_interval"
dtmfterm="boolean"
type="MIME_type"
dest="URI"
destexpr="ECMAScript_Expression">
child elements
</record>
|
|
Attribute |
Description |
|
name |
The name of this recording. This variable holds the result of the record, and can be referenced anywhere within the record's form. The result is actually the file location of the recorded audio on the VoiceGenie platform. When referenced as Optional. (Defaults to an inaccessible internal variable.) |
|
expr |
An ECMAScript expression to be evaluated and used as the initial value of this record. This record will be visited only if the expression evaluates to |
|
cond |
An ECMAScript expression to be evaluated and used as a boolean condition. This record will be visited only if the expression evaluates to |
|
modal |
Set to true if only the record's (dtmf) grammars are enabled. Otherwise, all active (dtmf) grammars are enabled. Optional. (Defaults to true.) |
|
beep |
Specifies whether or not a beep should be emitted just prior to recording. Platform owners can access the audio file at |
|
maxtime |
The maximum duration to record. Minimum value is 250ms (if defined as a shorter duration, it will be set to 250ms); maximum value is whatever the default is (if defined as a longer duration, it will be set to the default). Optional. (Defaults to 600000ms/10min or value of com.voicegenie.maxrecordtime property.) |
|
mintime |
If the duration of the recording is less than this attribute, then the recording is assumed to be empty and a |
|
timeout |
The time to wait, if no speech occurs, before throwing a A platform extension. |
|
finalsilence |
The interval of silence that indicates end of speech. Maximum value is the value of the |
|
dtmfterm |
Setting this to true is equivalent to defining a local DTMF grammar which matches any single DTMF key (to terminate recording). The DTMF tone will not be part of the recording. Optional. (Defaults to true.) |
|
type |
The media format of the resulting recording. Optional. (Defaults to audio/basic.). See Type Chart, below. |
|
dest |
The destination of the recording. Optional. A platform extension. |
|
destexpr |
An ECMAScript expression to be evaluated and used as the destination of the recording. Optional. A platform extension. |
error event may be thrown if a reserved ECMAScript word is used as the name.The audio types in the following chart are also supported for full-call recording. (If you own a VoiceGenie platform, see the GenieSupport tutorial for details on the full-call recording feature.) However, note that versions 5.x and 6.x have a limitation that any full-call recording types containing a semi-colon (';'), such as audio/x-wav;codec=ulaw, will cause an error.
Supported Recording Formats
|
Notes
For each <record> whose name attribute is set to <name>, there is a shadow variable <name>$ (in the same scope as the record name variable), containing the following properties:
|
Property |
Description |
|
name$.duration |
The duration of the recording in milliseconds. |
|
name$.size |
The size of the recording in bytes. |
|
name$.termchar |
If the dtmfterm attribute is true, and the user terminates the recording by pressing a DTMF key, then this shadow variable is the key pressed (e.g. "#"). Otherwise it is ECMAScript |
|
name$.maxtime |
Set to true if the recording was terminated because the maxtime duration was reached. |
|
name$.dest |
(VoiceGenie extension) The location of the recording. |
|
name$.filetype |
(VoiceGenie extension) The media format of the recorded audio file. |
|
name$.markname* |
(VoiceXML 2.1 feature) The name of the mark last executed by the SSML processor before barge-in occurred or the end of audio playback occurred. If no mark was executed, this variable is |
|
name$.marktime* |
(VoiceXML 2.1 feature) The number of milliseconds that elapsed since the last mark was executed by the SSML processor, until barge-in occurred or the end of audio playback occurred. If no mark was executed, this variable is |
undefined. Audio Catch Error Filled Grammar Help Noinput Nomatch Prompt Property Value #PCDATA
mintime attribute.dest attribute.destexpr attribute.dest and filetype shadow variables.beginsilence and finalsilence attributes, to avoid a noinput event being thrown.enctype="multipart/form-data", the Content-Type of the submitted data in the request is set to the actual MIME type associated with the audio file format of the recording.
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form>
<record name="message" beep="true" maxtime="10s">
<prompt>
At the tone, please record your message.
</prompt>
<filled>
You recorded <value expr="message"/>.
</filled>
</record>
</form>
</vxml>
|