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

Audio tag not working

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
it@acryness.com
Posts: 10
Joined: Tue Dec 05, 2017 3:57 pm

Audio tag not working

Post 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>

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

Re: Audio tag not working

Post 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

it@acryness.com
Posts: 10
Joined: Tue Dec 05, 2017 3:57 pm

Re: Audio tag not working

Post 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>

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

Re: Audio tag not working

Post 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.

it@acryness.com
Posts: 10
Joined: Tue Dec 05, 2017 3:57 pm

Re: Audio tag not working

Post by it@acryness.com »

Thanks. That fixed the issue. Removed Prosody and used expression.

Post Reply