Rss Categories

"audio" Element

Reference Number: AA-01569 Views: 2560 0 Rating/ Voters




The audio element supports the insertion of recorded audio files in conjunction with synthesized speech. The audio element may be empty. If the audio element is not empty then the contents should be marked-up text to be spoken if the specified audio document is not available.

The result of this will be either; the referenced audio file is played, or the alternate text (if any is specified) will be rendered.

Version 10.5
Note that this documentation refers to LumenVox version 10.5 only. Prior versions had inconsistent support for audio formats. The previous behavior when using TTS2 would mix the specified audio file with synthesized text if any was contained within the tag, looping the audio shorter than the duration of the synthesized text audio. In addition, TTS2 expected the input audio format to match the requested synthesis format -- i.e. if 8kHz aLaw was requested, it expected a wav file containing audio in aLaw format.




src = “src” >

  child elements











Points to the location of the audio file.  mandatory field



<audio>, <emphasis>, <p>, <prosody>, <s>, <speak>, <voice>


<audio>, <break>, <desc>, <emphasis>, <mark>, <p>, <phoneme>, <prosody>, <say-as>, <sub>, <s>, <voice>


The value of the src attribute may refer to a local filepath(e.g. "file://c/audio/prompt.wav") or a remote HTTP location (e.g."http:// /audio/prompt.wav").

The audio file format should be 16-bit 16 KHz PCM format only. This will be internally converted as needed to the target format.

If the referenced audio file cannot be accessed, the alternate child content will be rendered. If the referenced audio can be accessed, it will be played, and the alternate text will not be used.

The value of src is affected by the value of <speak>element xml:base attribute.

If the value of <speak> element xml:base attribute is“file://c/audio” and the value of <audio> element src is “test.pcm” themodified audio file will be found in “file://c/audio/test.pcm”.

In order for the value of src to not be affected by the value of <speak> element xml:base, you should use an absolute URL -- e.g. "http://remote-host/path/to/audio.wav" or "file://path/to/audio.wav"

If <speak> element xml:base attribute value is“file://c/audio” and <audio> element src is “@file://c/audio2/test.pcm”, the referenced audio file will be found in “file://c/audio2/test.pcm”.



<?xml version="1.0"?>

<speak version="1.0"  xmlns=""






<!-- Empty element -->

  Please say your  name after the tone.  <audio  src="beep.wav"/>

  <!-- Container  element with alternative text -->

  <audio  src="prompt.pcm">What city do you want to fly from?</audio>

  <audio  src="welcome.wav"> 

     <emphasis>Welcome</emphasis> to the Voice Portal.