We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

why do I get an error.badfetch for an <audio> tag ?

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
sureshkuyilath
Posts: 9
Joined: Tue Nov 04, 2003 6:35 pm

why do I get an error.badfetch for an <audio> tag ?

Post by sureshkuyilath »

According to VoiceXML standard, atrribute "src" is optional for tag "audio". If I don't use "src", TTS text is not played. Is that a known bug?
If yes, could you please suggest a workaround? If not, what I am doing wrong? I could workaround by specifying a non-existing "src". That results in fetch exceptions, doesn't look like the correct way.

Code: Select all

<audio>
     Hello World!
</audio>
Thanks,
Suresh

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Audio without voice- remove <audio> tags from IVR code

Post by support »

You have suggested you would like to do the following:

Code: Select all

<audio>
  This text should be converted to tts.
</audio>
Running the above IVR code on our IVR platform will throw an error.badfetch. If you look more closely at the spec, this is the correct behavior. The src attribute is optional, however the spec states in Section 4.1.3:
Exactly one of "src" or "expr" must be specified; otherwise, an error.badfetch event is thrown.
The simple work around for your IVR code is to simply remove the <audio> tags completely.

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <block>
      This text should be converted to tts.
    </block>
  </form>
</vxml>
You are confusing the audio tag with tts generation, the generation of tts is implicit for all text inside the <block> tag, <prompt> tag and most SSML tags. Hope this helps! :)
Last edited by support on Thu Feb 25, 2010 5:40 pm, edited 4 times in total.

sureshkuyilath
Posts: 9
Joined: Tue Nov 04, 2003 6:35 pm

Post by sureshkuyilath »

Thanks, That was my mistake. I overlooked the specification that you correctly pointed out.
Regards,
Suresh

Post Reply