Adding Your Own Audio
Although electronic synthesized voice can be quite compelling, you can also provide your own recorded audio in the form of 8-bit .wav files. Listing 2 combines both synthesized speech and an audio track.
Listing 2 Adding an audio .wav file to a dialog
1 <vxml version = "2.1" > 2 <form> 3 <block> 4 Here’s a special birthday message for you. 5 <audio src="happybirthday.wav"/> 6 We hope you are enjoying your day. 7 </block> 8 </form> 9 </vxml>
The result of the above VoiceXML is a combination of synthesized and actual voice or music. Because the value of the src attribute is interpreted as a URI, the audio file reference can be relative to the location of the VoiceXML document (as in line 5) or absolute, as in the following:
<audio src="http://www.server.com/vxml/song1.wav"/>
In effect, .wav files available on the public Internet can be used within your voice application.