Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== VoiceXML Example : Hello World! ===== **Simple with TextToSpeech** <code> <?xml version="1.0"?> <vxml version = "2.0" xmlns="http://www.w3.org/2001/vxml"> <form> <block>Hello world!</block> </form> </vxml> </code> The VoiceXML browser will use the TextToSpeech to convert the text "Hello world!" to a synthesis audio prompt. Download : [[http://downloads.voximal.com/vxml_examples/helloworld/helloworld1.vxml|helloworld1.vxml]] **With an audio file** <code> <?xml version="1.0"?> <?xml version="1.0"?> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"> <form> <block> <prompt> <audio src="helloworld.wav"/> </prompt> </block> </form> </vxml> </code> The VoiceXML browser will play the audio file helloworld.wav (in the same folder). In this example, the audio content "Hello World!" message. You can use any format supported by the asterisk. Download : [[http://downloads.voximal.com/vxml_examples/helloworld/helloworld2.vxml|helloworld2.vxml]] [[http://downloads.voximal.com/vxml_examples/helloworld/helloworld.wav|helloworld.wav]] **With Asterisk audio reference** <code> <?xml version="1.0"?> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" xml:lang="en"> <form> <block> <prompt> <audio src="uri:asterisk_audio"/> </prompt> </block> </form> </vxml> </code> The VoiceXML browser will use the default Asterisk audio folder to play the message. The default folder is "///var/lib/asterisk/sound//". The language set in xml:lang select the Asterisk language. [[http://www.voip-info.org/wiki/view/Asterisk+sound+files|Asterisk sound files]] Download : [[http://downloads.voximal.com/vxml_examples/helloworld/helloworld3.vxml|helloworld3.vxml]] examples/helloworld.txt Last modified: 2015/10/13 21:37by borja