VoiceXML 2.1 Development Guide Home  |  Frameset Home


<audio>  element


The audio element allows you to play an audio sound file in your application, assuming that your file is in the following formats:
In the event that your audio URL cannot be located, you can nest backup text to speech within the audio tags to ensure that a message of some sort will get played. See Appendix F in the Voxeo documentation for further information and helpful hints.



usage

<audio expr="CDATA" fetchhint="(prefetch|safe)" fetchtimeout="CDATA" maxage="CDATA" maxstale="CDATA" src="string - URI">


attributes

expr Data Type: CDATA Default: Optional
The expr attribute is used when we want to use a generated value rather than an explicit URI for our audio file’s destination. The value for this variable must equate to a valid audio URI, else the content will not be executed.
fetchhint Data Type: (prefetch|safe) Default: safe
Fetchhint is used to specify when the resource should be fetched during application execution. The possible values and their descriptions are:
  • prefetch : Begin the resource fetch upon initial document execution
  • safe: Only fetch the resource when it is specifically called in the application

Note that the Voxeo platform will always *not* prefetch content by default. As such, a developer should specify a value of ''prefetch" if resources are to be made available prior to execution of application content.
fetchtimeout Data Type: CDATA Default: 5s
The ‘fetchtimeout’ attribute is used to indicate how long, (in seconds or milliseconds), the interpreter should attempt to fetch the file in question before reverting to any backup TTS, (if present), or before the application execution skips over the contents of the <audio> tag, (if no backup TTS is present).  Also note the strict formatting of this value; if specified, the time value must have the ‘s’ denomination appended to it, else an error.badfetch is thrown.
maxage Data Type: CDATA Default: Optional
The maxage and maxstale attributes replace the VXML 1.0 caching attribute for compliance to the w3c vxml 2.0 specification. The value for this attribute specifies the maximum acceptable age, in seconds, of the resource in question. However, it is strongly advised not to rely on this attribute for cache-control; caching is always best controlled by the hosting server's response headers. If no headers are specified, then no cache control will be present, regardless of the value set for the maxage and maxstale attributes.
maxstale Data Type: CDATA Default: Optional
The maxage  and maxstale attributes replace the VXML 1.0 caching attribute for compliance to the w3c vxml 2.0 specification. The value for this attribute specifies the maximum acceptable staleness, in seconds, of the resource in question. However, it is strongly advised not to rely on this attribute for cache-control; caching is always best controlled by the hosting server's response headers. If no headers are specified, then no cache control will be present, regardless of the value set for the maxage and maxstale attributes.
src Data Type: string - URI Default: Optional
The ‘src’ attribute specifies a URI pointing to a valid audio file for your application to play. Ex: <audio src=”MyServer/MyDir/MyFile.wav”/>;You can also use dtmf:1234 to send out-of-band dtmf tones in your applications: <audio src="dtmf:1234"/>



shadow variables

none


parents

<audio>   <block>   <catch>   <choice>   <enumerate>   <error>   <field>   <filled>   <help>   <if>   <initial>   <menu>   <noinput>   <nomatch>   <prompt>   <record>   <subdialog>   <transfer>


children

<audio>   <break>   <emphasis>   <enumerate>   <foreach>   <mark>   <phoneme>   <prosody>   <say-as>   <value>


code samples

<Audio fetchhint> sample
<?xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1">

<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2005 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

<form id="F_1">
  <block>
    <prompt>
        here we use the audio fetchhint attribute with the value of prefetch.
    </prompt>
    <audio src="MySoundFile.wav"  fetchhint="prefetch"/>

    <prompt> here we use the audio fetchhint attribute with the value of safe. </prompt>
    <audio src="MySoundFile.wav"  fetchhint="safe"/>
  </block>
</form>

</vxml>



<Audio fetchtimeout> sample
<?xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1">

<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2005 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

<form id="F_1">
  <block>
    <prompt>
      here we use the audio fetch time out attribute with the value of 10 seconds.
    </prompt>
    <audio src="MySoundFile.wav"  fetchtimeout="10s"/>
  </block>
</form>

</vxml>



<Audio maxage-maxstale> sample
<?xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1">

<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2005 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

<form id="F_1">
  <block>
    <prompt>
      here we demonstrate the max age and max stale attributes.
    </prompt>
    <audio src="MySoundFile.wav"  maxage="500" maxstale="1000"/>
  </block>
</form>

</vxml>



<Audio expr> sample
<?xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1">

<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2005 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

<form id="F_1">

  <var name="AudioVar" expr="'MyAudioFile.wav'"/>

  <block>
    <prompt>
      here we use the audio expression attribute rather than a URI for
      our audio file.
  </prompt>
    <audio expr="AudioVar"/>
  </block>
</form>

</vxml>




additional links

W3C 2.0 Specification
W3C 2.0 Specification


  ANNOTATIONS: EXISTING POSTS
Asier
11/22/2005 12:10 PM (EST)
Hello there,

If there are several .wav files, and i call at the same file in several parts in the document, how many times fetch the resource with the fetchhint="prefetch"?

Thanks in advance,
Asier
steve.sax
11/22/2005 1:56 PM (EST)

Hello Asier,

Note that resources are prefetched by default, so this does not need to be explicitly set in your <audio> tag. Also note that this attribute setting doesn't really have anything at all to do with how many times a file will be fetched at all.

As such, if you reference a file 3 times, then it will be fetched 3 times from your server. It is our advice that any audio files be cached on the server in order to reduce any chances of a fetch delay at all; please review the below link for details on setting cache headers:

http://www.voicexmlguide.com/caching.htm

Steve Sax
safarishane
4/27/2006 12:25 PM (EDT)
Hey, you have both the src and expr attributes listed as optional, but in practice isn't one or the other required?  Skipping both will cause a badfetch, according to the spec:

"Exactly one of "src" or "expr" must be specified; otherwise, an error.badfetch event is thrown."
mikethompson
4/27/2006 2:30 PM (EDT)
Hey Shane,

I think that the documentation could be a little more clear here, but let me explain why they both say optional...

*If* you embed text to speech from within your audio tag (ex: <audio>Simma Down Nah</audio>) it essentially works as a <prompt> element in that sense.  This will prevent a badfetch from being thrown.

Regards,
Mike Thompson
Voxeo Extreme Support
yana
7/9/2006 6:48 AM (EDT)
Hello,

Do I have option to catch <error> event if <audio> element trying to play file that not found?

Thanks
Yana
Michael.Book
7/9/2006 12:19 PM (EDT)
Yana,

As per the VoiceXML specification:

"If the audio file cannot be played and the content of the audio element is empty, no audio is played and no error event is thrown."


Best,

~ Michael
yana
2/7/2007 4:12 AM (EST)
Michael.

Thanks for you facilitation.
I have one more question. I need to call anothe vxml after end of play. I tried to use <submit> element after prompt like this:
<form id="F1">   
    <field name="playPrompt">
   
        <prompt><audio src="2.wav"/></prompt>
   
      <filled>
        <submit next="second.vxml"
                        method="post"/>           
        </filled>  
    </field>     
    </form>
But it doesn't work, the function POST is not be called. What I need to do to call it after End-Of_Play?

Thaks,
Yana
jbassett
2/7/2007 7:49 AM (EST)
Hello,

http://docs.voxeo.com/voicexml/2.0/submit.htm has good information on submit usage. If you simply want to transition to a new document at the end, you can use the <goto> element. The submit section I linked will also show you some variable passing examples as well.

Thanks
Jesse Bassett
Voxeo Support
yana
2/8/2007 5:31 AM (EST)
Hello,

I am sorry, I asked question not cleare.
I need to get some indication that play is ended.
I tried:
<block>   
    <prompt><audio src="2.wav"/></prompt>
   
    <submit next="123456.vxml" method="post"
                  namelist = "param"/>
</block>

In ethereal I see that the next document is reading simultaneously with play, not after. Is the next document is calling after play is ended?  Moreover, I see that this vxml call to GET of 123456.vxml, not POST as I expected.

Thans,
Yana
mikethompson
2/8/2007 12:20 PM (EST)
Yana,

Regardless of what you're seeing in your ethereal trace, the audio should complete before transitioning to the next document.  Also, the real-time debugger in the evolution environment is the best way to troubleshoot application issues like this.  By placing a call into your application with this debugger open, it will be very easy to follow the call.  If you ever experience problems with the call flow, you can submit the exact call example/debug output to us via the "support" tab at the top of the debugger page.

Anyway, in your case:

<block> 
    <prompt><audio src="2.wav"/></prompt>
 
    <submit next="123456.vxml" method="post"
                  namelist = "param"/>
</block>


The VoiceXML browser will complete the audio file before transitioning control to 123456.vxml.

Best,
Mike Thompson
Voxeo Corporation
sildev6
3/19/2007 12:20 PM (EDT)
Hello,

I have a wav file which has a Spanish accented character in its name and when I specify this wav file name in the "src" attribute, it fails to find it.

For example, the wav file is "jose.wav", where "o" is the accented character.

Does the <audio> tag handle such characters? Do I need to do anything special to handle such characters?

Thanks!
voxeojeff
3/19/2007 1:11 PM (EDT)
Hello,

The <audio> tag does indeed support accented characters, as long as the audio files are properly formatted.  The trick is to use URL encoding when referencing the file.  For example, if you had a file named "jóse.wav" and wanted to reference it correctly, you would use <audio src="j%C3%B3se.wav"/> with "%C3%B3" being the URL encoding that our hosted platform needs to produce an "ó" character.  An easy way to figure out what encoding you'll need is to check the URL (copy link location) of the actual audio file that is located in your "Account > Files, Logs, Reports" folder in your Evolution account.

Cheers,
Jeff Menkel
Voxeo Corporation
sildev6
3/19/2007 1:31 PM (EDT)

Thanks Jeff!
But how can I do this encoding programmatically? Do I need to define any encoding attributes in the <audio> tag? Our application supports all the spanish accented characters, so I have to be able to dynamically encode the wav file name when I construct the audio tag.

Thanks!
MattHenry
3/19/2007 3:31 PM (EDT)


Hi there folks,

To be clear, we can't really specify any encoding attributes via the audio tag, as the spec simply doesn't define any, and as such, we don't support them. My first suggestion would be to make use of some "regexpr" action in your dynamic code, where you can generate the encoded values of any foreign characters that you might need to output within the <audio> element.


Hope this helps,

~Matthew henry
sildev6
3/20/2007 4:01 PM (EDT)
Hello,

When you say, "..you would use <audio src="j%C3%B3se.wav"/> with "%C3%B3" being the URL encoding that our hosted platform needs to produce an "ó" character" - is this UTF-8 encoding?
If so, I would need to use the UTF-8 representation of the file name in the <audio> tag, is that right?

Thanks!
MattHenry
3/20/2007 5:42 PM (EDT)


Hi again,

This is correct. In my experience, any and all foregin characters that need to be encoded should be using the UTF-8 document encoding.

~Matt Henry

lambchops7
8/3/2007 11:52 AM (EDT)
I thought I read this somewhere, but I can't find it anymore.  How do you limit the input so that an audio file reads out uninterrupted in its entirety before a user is ALLOWED to enter input.  I guess I could make a few booleans and when boolean is true then you can enter input, but is there a built in property, etc?
thanks.
mikethompson
8/3/2007 12:00 PM (EDT)
Hi there,

What you're after is the bargein property. The 'bargein' property controls whether or not the TTS or audio prompts may be interrupted by a caller's voice input. This property defaults to 'true', unless specified.  It looks like this:

<property name="bargein" value="true|false"/>

Hope this helps,
Mike Thompson
Voxeo Corporation
bronson
1/10/2008 3:17 AM (EST)
Is there a way to skip the beginning of an audio file?  Something like <audio src="MySoundFile.wav" start-at="17s">?
voxeojeff
1/10/2008 11:13 AM (EST)
Hi bronson,

Unfortunately, there aren't any attributes which allow you to start at a certain point in an audio file.  If you wish to start at say, the 17 second mark, you should crop the audio file with an editing program (such as GoldWave) so that it begins at the desired point.

Regards,

Jeff
sharath.chandra
1/14/2008 6:44 AM (EST)
Hi, i want to play an audio file repeatedly.

my audio file is in .wav format and plays for about 5 seconds but i want to play it for 2-3  minutes repeatedly. how can i do that ?
mikethompson
1/14/2008 6:25 PM (EST)
Hello Sharath,

You can use the the <foreach> element to build an array of audio file names (all the same in your case), then looping as many times as you want.  Here's a snippet for your convenience:


      <script>
        var arrayList =
["1.wav", "1.wav", "1.wav",
"1.wav", "1.wav" ];
      </script>
     
        <prompt>
          Let's loop some audio files shall we?
          <break/>
        </prompt>

     
        <foreach item="audioloop" array="arrayList">
            <prompt> <audio expr="audioLoop"/> <break/></prompt>
        </foreach>

Best,
Mike Thompson
Voxeo Corporation
bronson
1/18/2008 8:38 AM (EST)
Thanks Jeff.  I'll see if I can automate the .wav slicing. 

Another question: is it possible to pause and resume playback of a wav file?  My app needs to read a lot of numbers off to the user; it would be nice if the user could say "pause" when he's falls behind and "play" or "resume" when he's caught up again.
voxeojeff
1/18/2008 11:41 AM (EST)
Hello bronson,

The ability to pause and resume playback of an audio file is not something that is currently possible in the VoiceXML specification.  This can however be done with some clever server side logic that will rely on tracking the .wav bit files and manipulating it to move through the recording.  While we don't have any examples of this being done, some of our customers have been able to accomplish this.  Please let me know if this helps clarify things for you, as well if you have any additional questions.

Regards,

Jeff
crishvi
2/28/2008 2:30 AM (EST)
hello,
Suppose my audio file's length is 15s and i wanted to play this file only for the time required to fetch data for the caller's query.How can i do this since the time taken to retrieve data may differ each time???please respond asap.thanks
voxeojeff
2/28/2008 10:34 AM (EST)
Hello,

In this case, if you're submitting to a database and waiting on content retrieval, you can use the 'fetchaudio' attribute within the <submit> tag to play some filler music while the fetch is being made.  Is this what you were essentially looking to do?

http://docs.voxeo.com/voicexml/2.0/submit.htm

Hope this helps,

Jeff
soguz
3/5/2008 2:39 PM (EST)
Hi,

I am trying to play a wave file in different directory than where my vxml files are.  For example: c:\vxml\ is where my vxml files and the wave file is in c:\test\1.wav.  When I try to use <audio src="c:\test\1.wav" />, it is not playing the wave file.  Do I always have to use virtual directory for src to play audio files? How can I make audio tag play wave files on my local directory or network directory?

Thank you in advance.
VoxeoDante
3/5/2008 4:30 PM (EST)
Hello soguz,

If you would like to play an audio file on a local Prophecy installation, you should put the file in the c:\program files\voxeo\www directory.  This is the web server directory for the Prophecy server.

You can also specify a URL for audio files if you wish to fetch them from a remote location.

<audio src="http://www.mysrver.com/audio/test.wav"/> 

Or you could replace the hostname with an IP if you like.

<audio src="http://127.0.0.1/audio/test.wav"/>

If your audio was located in the www directory and your VXML was in www/vxml you could go back one directory in the src.

<audio src="../test.wav"/>

I hope this helps.

Regards,
Dante Vitulano
Extreme Support
deepak
6/6/2008 5:04 AM (EDT)
Hi,
  I have three different .wav to be played.Suppose i say skip after first .wav file it should go to second .wav file.But there is  a problem .Its not going to second .wav file.Kindly suggest me how to go about this?

I have added this .Wav files in While loop.

Kindly tell me does <catch > element support scriptlets.
VoxeoDustin
6/6/2008 10:13 AM (EDT)
Hey Deepak,

Would you mind opening an account ticket with your code so we can take a look and try to reproduce the issue you're seeing?

To open an account ticket, click the ACCOUNT tab at the top select Support Tickets and click Open New Account Ticket.

Cheers,
Dustin
jefo12
9/12/2008 8:18 AM (EDT)
Hi,


can any one guide me how to keep an audio file in loop.


thanks.
VoxeoDustin
9/12/2008 10:00 AM (EDT)
Hey Jefo,

If you wouldn't mind, could you give me an idea of what you're trying to accomplish? With a little more info, we should be able to find a solution for you.

Thanks,
Dustin
feel012
9/18/2008 1:48 AM (EDT)
Hi~
I have a question.
While I play wav file, I want to work another job. Until meets some stop sign.
Like a "fire and forget"
Is it possible??
voxeoJeffK
9/18/2008 2:22 AM (EDT)
Hi,

While there's no built-in way to loop a wav file, there are some tricks to accomplish it. It would depend on what you mean by "work another job". What will you be trying to do while the wav file is playing? Will you be waiting on a server-side <submit>, or something else? Depending on what you wish to do, you may be better served using CCXML to control VXML dialogs instead.

Jeff K.
jefo12
9/19/2008 12:42 AM (EDT)
Hi,

can any one guide me how to keep an audio file in loop.I'm playing the audio file while fetching for jsp but fetching for jsp in our case take more time but the audio file stops playing after some time i don'nt want to increase the size of the audio file i need to have a audio file in loop programatically.


          Can any one suggest me !


Thanks,
Jefo.
voxeoJeffK
9/19/2008 12:58 AM (EDT)
Hi Jefo,

One way would be to loop through an array:

      <script>
        var arrayList =
                ["1.wav", "1.wav", "1.wav",
                  "1.wav", "1.wav" ];
      </script>
   
        <prompt>
          Let's loop some audio files shall we?
          <break/>
        </prompt>

   
        <foreach item="audioloop" array="arrayList">
            <prompt> <audio expr="audioLoop"/> <break/></prompt>
        </foreach>

Regards,
Jeff K.
jefo12
9/22/2008 2:14 AM (EDT)
Thanks jeff for your reply.


But i need to loop a audio file which is in fetchaudio

<property name="fetchaudio" value="http://...../one.wav"/>

Can you help me out how to handle in this case ?


Thanks,
jefo.
voxeoJeffK
9/22/2008 2:31 AM (EDT)
Hi Jefo,

Unfortunately this type of looping is not presently possible. We have had requests for this functionality previously, and a Feature Request has been made with our Engineering Department. I don't have a timetable on if/when that may be implemented unfortunately.

Regards,
Jeff K.
kunalp25
3/26/2009 6:41 PM (EDT)
I am trying to set up a test for the audio tags. Basically I want to cache the audio file based on the time I set in the header.  I have a java servlet setting a head as such:

response.setHeader("Expires" <SOME DATE>);

The date format I am using is:

"EEE, MM MMM yyyy HH:mm:ss"

Thu, 03 Mar 2009 22:54:04

I set the time zone to GMT.

Now when I call my test # I see the server log update saying its passing this file over.  When I hang up and dial again, I post another request even though my cache time(above ) is GMT 15 minutes ahead. Am I setting the header right? How do I test this in order to see its being cached?  Thank you.
voxeo_chris
3/26/2009 8:11 PM (EDT)
Hey Kunal,

I was wondering if it would be possible if you could send over the logs of the call from the debugger, your webservice logs, and the application you are running as well so we can get the complete picture on the caching issue.  Also, please do this inside of a separate private support ticket so that we can keep your logging information private and secure.  We will be looking forward to your response.

Regards,

Chris Bruckart
Customer Engineer
Voxeo Support
kunalp25
3/27/2009 9:34 AM (EDT)
Thanks for helping me with this. I actually think first off that my header entry is off, "EEE, MM MMM yyyy HH:mm:ss", the MM should be DD. I am trying that now, and will post my results. Just as an FYI, is the Expire header obeyed? What about Cache-Control? Thank you.
VoxeoDante
3/27/2009 9:55 AM (EDT)
Hello,

Both the expires and cache-control are obeyed, but expires is only obeyed to an extent.

Let me explain.  We will cache a file for 20% of the maxage or 7days which ever comes first.  At that point we will begin to fetch the headers on the file to check the last modified date.  If the file has been modified since the last time we fetched the file, we will fetch the complete file again.

Just one more note I wanted to add.  If the fetch of the headers on the file fails, the application will treat the failure the same way it would if a fetch of the file failed and an error.badfetch will be thrown.

Please let us know how your testing goes.

Regards,
Dante Vitulano
kunalp25
3/27/2009 10:27 AM (EDT)
It didnt seem to work for me. I am going to see how to open a support ticket and will send that off right now.
aman123singh
4/6/2009 3:59 AM (EDT)
hi.. i have to play a url that contain a .wav format. how can i play wav file which is in other server .. did " works here audio src" please tell me the solution about how u play the url tht contain .wav file here is the link of the url tht i want to play


http://web3.equals.com:8999/wowza/shoutfileservice?filename=40781aae-df8c-4431-9673-2a6071226ac5.wav
voxeoJeffK
4/6/2009 4:42 AM (EDT)
Hello,

The way to play an externally hosted audio wav would be:

  <audio src="http://web3.equals.com:8999/wowza/shoutfileservice?filename=40781aae-df8c-4431-9673-2a6071226ac5.wav"/>

However, checking that link, it appears we are not able to connect. i would recommend checking the availability of the wav file at that address.

regards,
Jeff Kustermann
Voxeo Support
chakri.950
5/21/2009 6:52 AM (EDT)
Playing Multiple Nested Audio Files:

<field name="xyz" type="digits">
  <audio src="file:///C:/test/main.vox"> <audio src="file:///C:/ivrAudioFiles/soc/one.vox">
played audio file one
</audio>
<audio src="file:///C:/ivrAudioFiles/soc/two.vox">
played audio file two
</audio>
<audio src="file:///C:/ivrAudioFiles/soc/three.vox">
played audio file three
</audio>
  </audio>
</filled>
......
</filled>
</field>

Requirement:

Actually my requirement will deal with playing audio files dynamically. When root(main) audio file is not existing through loop I want nested audio files to play i.e., inner audio files loop has to run.
For understanding I am providing code for my requirement in simple.

My requirement is that when there was no "main.vox" audio file I want to play the backup audio files "one.vox" and "two.vox" and "three.vox".

Problem:

When there was no "main.vox" audio file it is only playing "one.vox" audio flie; it is not playing the remaining "two.vox" and "three.vox" audio files.

Could you please suggest me how can i meet my requirement.

Thanks & Regards,
Chakri

VoxeoBrian
5/21/2009 10:11 AM (EDT)
Hello,

I have been unable to reproduce the issue you are experiencing, in the below example, I do not have the necessary files to reference any of these local URI's and as such the fetches fail, and I am reverting to backup TTS.

My call flow is as follows:

Main Vox.
played audio file one
played audio file two
played audio file three


[code]<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">

<form>
<property name="inputmodes" value="dtmf"/>
  <field name="xyz" type="digits">
  <audio src="file:///C:/test/main.vox">
    Main Vox
<audio src="file:///C:/ivrAudioFiles/soc/one.vox">
played audio file one
</audio>
<audio src="file:///C:/ivrAudioFiles/soc/two.vox">
played audio file two
</audio>
<audio src="file:///C:/ivrAudioFiles/soc/three.vox">
played audio file three
</audio>
 
</audio>

</field>
</form>
</vxml>
[/code]

What I expect maybe happening is that background noise is triggering a bargein event and preventing the field from playing all of its content, try implementing this at the <form> scope.

<property name="inputmodes" value="dtmf"/>

This will make sure background noise isn't to blame here.

If I have in some way missed the issue you are experiencing, we can move this into a private ticket and get some logging from you on the issue.

Thanks!

Brian F.
subharavi
7/8/2009 9:34 AM (EDT)
Hi,

Is there any event to check whether a particular audio has been played or not?

Through my application, I'm playing some set of audio files one by one. I'll play the first audio file, if the user said "next" i'll play the next audio file. Before the first audio file is going to play , if the user said "next", it will play the second audio. But in this situation i need to play the first audio only. If the user listened the first audio partially too, if he said "next" i'll play the second audio(prompt bargein="true").

Before going to play the second audio i need to check whether the first audio gets played or not?

can anyone help me?

Thanks,
Subha.
VoxeoDante
7/8/2009 10:22 AM (EDT)
Hello subharavi,

That should be possible.  My suggestion would be to create a tracking variable if you will. 

Create a var for first audio and assign that variable an initial value of not played.  Then once you play the first audio file you can change the value to played.

When you go to play the second or subsequent files you could simply do a

<if cond="myvar=='notplayed'">
<goto next="#audio1">

This way if the initial audio file has not been played you could re-direct the caller to the first audio file.

Additionally you could just turn off bargein for that first audio file and make the person listen to the first audio file.

I hope this helps.

Cheers,
Dante Vitulano
Voxeo Corporation
ssa_peregrin
12/3/2009 2:52 PM (EST)
Greetings Voxeo,

It would appear that prompt is not a valid child of <audio>. If I needed to change TTS lang numerous times throughout a backup TTS within an audio tag, how would I accomplish this?

I don't have a sample of code to provide at the moment as what I'm asking is currently only concept, but I can think of an example (though maybe not a good one) to use multiple voices.  If we were to have a ~45 second audio file that was two different people speaking to each other, would there be a way to mimic these two 'voices' within backup TTS, while still keeping a single audio file?

example (I'm quite sure this won't work since prompt isn't a valid child of audio)

[code]
<audio src="audio.wav"> <!-- Play a two way dialog -->

    <prompt xml:lang="en-us-f">
          Hello there, I understand you're interesting in something that the something company offers.
    </prompt>

    <prompt xml:lang="en-us-m">
          I am very interested in something.
    </prompt>

    <prompt xml:lang="en-us-f">
          Well can I have your phone number to blah blah?
    </prompt>

    etc...

</audio>
[/code]

would there be a way to accomplish this type of a backup TTS while keeping a single audio file?

Thanks,
-Russ
VoxeoDante
12/3/2009 3:29 PM (EST)
Hello Russ,

I am not aware of a way that you would be able to do this as backup TTS with one audio file.  It seems as though you already understand the problem pretty clearly.  There is no real way to change the TTS engine in the backup TTS for a audio file.

I think the best option here would be to break up the audio file into different pieces and assign a backup TTS portion to each.

Regards,
Dante Vitulano
Customer Support Engineer II
Voxeo Corporation
moniemkandeel
4/15/2010 6:37 AM (EDT)
Good Day every body,

when i try to close phone when wav files is run it throw exception below

Error: TWaveAudioPlayer failed.  waveOutUnprepareHeader returned: 33. Cannot perform this operation while media data is still playing.

can any one help me PLz
voxeoJeffK
4/15/2010 7:35 AM (EDT)
Hello,

May we request some additional details? Is this error in the Prophecy softphone, a different phone or in the Prophecy logs?

Regards,
Jeff Kustermann
Voxeo Support
learnvxml
5/6/2010 12:39 PM (EDT)
Hello Voxeo!

Does Voxeo provide a library of short audio clips that may be used during the call flow? For example, an audio clip when a menu is selected, another when caller wants to 'go back', etc.

Thanks in advance!
Santhana.
voxeoblehn
5/6/2010 4:38 PM (EDT)
Hello Santhana,

Feel free to visit our pre-recorded audio page which allows you to freely download commonly used audio samples to use in your applications [link=http://evolution.voxeo.com/library/audio/prompts/home.jsp]here[/link].

Best Regards,

Brian Lehnen
Voxeo Support
learnvxml
5/20/2010 5:58 PM (EDT)
PLEASE IGNORE THIS COMMENT *FOR NOW* - I believe the audio file format was at 22KHz when I thought it was at 8KHz! Sorry.
------------------------------------------------------
I am spending way too much time with audio clip files! :(

I have short music audio clips in 16bit, 8KHz, PCM WAV files that play well in Windows Media Player. But when I upload them to a web server and play from voicexml application using <audio> they play very slowly, completely distorting the music.

Why? What am I missing? Or, does Voxeo platform have a problem in handling audio music clips?

Thanks in advance.
------------------------------------------------------
Santhana.
moshe
6/3/2010 9:43 AM (EDT)
The VoiceXML 2.0 specification does not include "dftmf:" as a required format for the src attribute. While it's legal to have other audio formats, perhaps a note to effect that "dtmf:" is specific to the Voxeo platform is in order.

For forestall any debate on the topic, VoiceXML 2.0 specifies a URI as the value of src, and "dtmf:" is a URI.

In the same vein, 16-bit wav is also specific to the Voxeo platform.
kaku1986
6/25/2010 5:03 AM (EDT)
If you want to mention a fallback url for your audio tags then do this,

<audio src="urlA">
          <audio src="fallBackUrlIfUrlADoestNotExist"/>
</audio>
fyp107
7/1/2010 3:10 AM (EDT)
hello,
i want to know that where should i upload my audio files in order to get them played in my application. i have uploaded them in the recordings directory of the Files, Log and Reports section. but for some reason i only hear the backup TTS instead of the recorded audio files.
Please guide me where i should upload them.
voxeoJeffK
7/1/2010 3:25 AM (EDT)
Hello,

Generally the recordings folder is used for recordings of a user, and the audio directory is used for application sound files. You can place them as desired. However, you will need to properly reference the path to the audio files. For example if a file is in the audio directory, instead of:

  <audio src="nextquestion.wav" />

it would be:

  <audio src="audio/nextquestion.wav" />


Regards,
Jeff Kustermann
Voxeo Support
herocksit
7/9/2010 12:08 AM (EDT)
Hi,

How to interrupt the audio file being played after certain number of seconds irrespective of user input.

This is kind of preview feature. Playing only part of the file and stop it after 5 secs.

Thanks
Gov.


voxeoJeffK
7/9/2010 1:53 AM (EDT)
Hello,

Unfortunately the VoiceXML 2.1 spec does not make provisions for playing partial audio files, and files are output in full. The newest incarnation of the VXML specification should have the fine-grained media control required for your scenario. It's likely a year or two before we will have this available to our developers, but you can count on Voxeo being one of the first to support VXML 3.0 when the specification has been finalized.

Regards,
Jeff Kustermann
Voxeo Support
SSA_Whispir
12/16/2010 7:16 PM (EST)
Hi guys,

Just want to know if we can add a pause when using 'dtmf:1234' to send out-of-band dtmf tones?

I want to add a 1 second pause between some digits.
voxeoTonyT
12/16/2010 8:44 PM (EST)
Hello,

Could postdialing be an option for you?  Click [link=http://www.vxml.org/postdialing.htm]here[/link] to see some info on postdialing.  In the meanwhile if there is anything else we can assist you with please let us know.

Regards,

Tony Taveras
Customer Engineer
Voxeo Support
iskram
10/18/2011 1:53 PM (EDT)
I use a JBoss server to host the audio recordings. I use a synthesized voice fallback. E.g.:

<prompt>
  <audio src="http://localhost:8180/MyApp/rec/not_ready.wav">The file is still being processed.</audio>
</prompt>
voxeoTonyT
10/18/2011 2:58 PM (EDT)
Hello,

I'm not sure if you're reporting a problem or just offering info but just to make sure can you confirm?

Regards,

Tony Taveras
Customer Engineer
Voxeo Support

login



© 2012 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site