audio Element

Supports the insertion of recorded audio files.

Syntax

<audio src="string" /> </audio>

Attributes

Attribute

Description

src

Required. Specifies the path and name of the audio file. The value of this attribute can be an absolute, local path for speech applications running in a local environment. This attribute is case-sensitive only when referencing files residing in file systems that are case-sensitive.

The audio element supports .WAV files containing RIFF headers and encoded with the following parameters.

Parameter

Value

Format

PCM, a-law, u-law

Bit-depth

8 bits, 16 bits

Channels

Mono only

Sampling Rate

All sampling rates supported.

Remarks

Use this element to play a known audio file.

The content of an audio element should be either plain text or text with SSML markup that should be spoken if the audio file specified in the src attribute is either unavailable or unplayable. The content of an audio element can also include another audio element.

Example

<?xml version="1.0" encoding="ISO-8859-1"?>
<speak version="1.0"
 xmlns="http://www.w3.org/2001/10/synthesis"
 xml:lang="en-US">

<p>
<audio src="http://www.treyresearch.net/audioprompts/opinionprompt.wav"> Thanks for offering your opinion. Please begin speaking after the beep. </audio>

<audio src="http://www.treyresearch.net/audioprompts/beep.wav"> The beep could not 
be played, please voice your opinion now. </audio>
</p>

</speak>