Page 1 of 1

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

Posted: Tue Nov 11, 2003 11:42 am
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

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

Posted: Wed Nov 12, 2003 2:10 pm
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! :)

Posted: Wed Nov 12, 2003 5:34 pm
by sureshkuyilath
Thanks, That was my mistake. I overlooked the specification that you correctly pointed out.
Regards,
Suresh