Plays an audio file. If the file cannot be played, the content of the <audio> element is played instead. Any content must be prompt markup, including text, speech markup, and/or other audio tags. The <audio> element can be used similarly to play a video file. If the file cannot be found/played and there's no alternate content, the <audio> element is ignored.
|
|
Attribute |
Description |
|
src |
The URI specifying the location of the audio file. The URI can be one of the following formats:
Optional. Exactly one of src or expr must be specified. |
|
expr |
An ECMAScript expression to be evaluated and used as the URI of the audio file, as documented under Optional. Exactly one of src or expr must be specified. |
|
fetchhint |
Defines when the audio file should be fetched. Optional.
Overrides the value of the audiofetchhint property. |
|
fetchtimeout |
The length of time to wait for the audio file to be fetched before playing the alternate content. If alternate content is not specified or cannot be found, the behaviour will be as specified in the element description, above. Optional. Overrides the value of the fetchtimeout property. |
|
maxage |
Indicates that this document is willing to use a cached copy of this audio file only while the age of the cached copy is less than or equal to the number of seconds specified by this attribute. Optional. Overrides the value of the audiomaxage property. |
|
maxstale |
Indicates that this document is willing to use a cached copy of this audio file that has exceeded its expiration time by as much as the number of seconds specified by this attribute. Optional. Overrides the value of the audiomaxstale property. |
|
volume |
Increases or decreases the volume of the audio file by the number of dB. Specified as +dB or -dB: eg. "+2". Optional. A platform extension. |
|
offsetexpr |
An ECMAScript expression to be evaluated and used as the time offset at which to begin playing the audio file. Optional. (Defaults to 0) A platform extension. |
|
lengthexpr |
An ECMAScript expression to be evaluated and used as the time length of the audio data to be played from the file. Optional. (Defaults to the length of referenced audio.) A platform extension. |
src and expr will result in an error.badfetch event being thrown or the call will be rejected if it is the first page, with no specified alternate page.Audio Enumerate Value Speech Markup (SSML) Tags
volume attribute.offsetexpr attribute.lengthexpr attribute.volume attribute is currently only supported using Dialogic. Also, the following limitations apply:volume attribute will not be accurate (i.e. may not seem to have any effect at all).
|