Page 1 of 1

Audio tag not working

Posted: Mon Feb 19, 2018 11:42 am
by it@acryness.com
Hi,

I am trying to play this audio. I tried with mp3 and wav file.
That audio file path is working if i open it in browser.
But nothing is played on IVR.
No error too. please suggest.

<prompt>
<prosody rate="slow"> You have <audio src = "https://fhivr.acryness.com/Insurance%20 ... 20Auto.wav"> AAA Auto </audio> on file.</prosody>
</prompt>

Re: Audio tag not working

Posted: Tue Feb 20, 2018 9:11 am
by support
Hi,

When we try to access the audio source URL, we get a 404 error. We would also like to mention, using an audio tag inside SSML tags is not supported. Can you verify that the URL you provided still works for you?

Regards,
Plum Support

Re: Audio tag not working

Posted: Wed Feb 21, 2018 9:57 am
by it@acryness.com
I changed the URL to <audio src="https://fhivr.acryness.com/Insurance%20 ... s/AARP.mp3" /> thinking the spacing might be causing the issue. Please try now.

But This is directly working for me too. But I have to get this URL dynamically. If I hard code it in IVR it is working fine. But If I use dynamically , It is not working. The link is getting converted to something like this when i see in call logs

here is my tag:

<prosody rate="slow"> You have <audio src="<value expr="thedata.insuranceinfo[0]"/>" /> on file.</prosody>

thedata.insuranceinfo[0] is returning the url https://fhivr.acryness.com/Insurance%20 ... s/AARP.mp3

<?xml version='1.0'?><speak><voice name="Tom"><prosody rate="slow"> You have <audio src="x-vxiprompt-ref:$_internalName_108276"/> on file.</prosody></voice></speak>

Re: Audio tag not working

Posted: Wed Feb 21, 2018 11:59 am
by support
Hello,

This main issue is being caused by the order of the tags in your code, we do not support using <audio> tags inside of any SSML tags (e.g. <prosody>). You need to move the <audio> tag outside of the <prosody tag to resolve the issue. Additionally if you want to use a dynamic audio source you will want to use the "expr" attribute in the <audio> tag. For example:

Code: Select all

<prompt>
  <prosody rate="slow"> You have </prosody>
  <audio expr="thedata.insuranceinfo[0]"/>
  <prosody rate="slow"> on file.</prosody>
</prompt>
Using this approach corrects the issues caused by embedding <audio> inside of a <prosody> tag as well as allowing you to use a dynamic URL for the audio file. Please let us know if you have any additional questions.

Re: Audio tag not working

Posted: Wed Feb 21, 2018 1:22 pm
by it@acryness.com
Thanks. That fixed the issue. Removed Prosody and used expression.