ssml:audio Element

Switch View :
ScriptFree
Speech Server
ssml:audio Element

Supports the insertion of recorded audio files.

Syntax

<ssml:audio src="string" />
<ssml:audio src="string"> </ssml:audio>
Attributes

Term Definition

src

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

The ssml:audio element supports RIFF header .wav files 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.

For speech applications deployed in a Speech Server environment, headerless audio files can be used provided that the server supplying the files passes the MIME type of the files.

The content of a non-empty ssml:audio element should be the plain text or SSML marked-up text to be spoken if the audio file specified in the src attribute is either not available or unplayable. The content of a non-empty element can also include another ssml:audio element.

Example

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

<ssml:p>

Thank you for volunteering your opinion.

<ssml:audio src="http://www.treyresearch.net/audioprompts/opinionprompt.wav">
Please voice your opinion after the beep.
</ssml:audio>

<ssml:audio src="http://www.treyresearch.net/audioprompts/beep.wav" />

</ssml:p>

</ssml:speak>