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

Application not letting me upload audio to repository

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
hscully
Posts: 6
Joined: Mon Aug 03, 2009 12:17 pm

Application not letting me upload audio to repository

Post by hscully »

I'm new. I have some wav files that conform that I wish to upload but I don't have a pin. I get this message File Upload Failed. Reason: The PIN code 0 does not exist in the database. Do I need to upgrade?

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

Plum IVR Audio Repository

Post by support »

Hi hscully,

Yes, you would need a production account to have access to the audio repository.

However, you are not required to use the audio repository to play audio files in your IVR application. You can just store audio files on your own web server and reference the files in your IVR script. For example, here's a small clip of some IVR code using the <audio> tag:

Code: Select all

      <audio src="http://www.yourwebserver.com/youraudiofile.wav">
        This message will be played if your audio file does not exist.
      </audio>
Or, you could reference the files relatively to where your file is stored. For example, if your files were set up in the following way on your IVR server:

appfolder
| index.vxml
| audiofolder
| youraudiofile.wav

You could then reference your audio file like this in your IVR code:

index.vxml:

Code: Select all

...
      <audio src="audiofolder/youraudiofile.wav">
        This message will be played if your audio file does not exist.
      </audio>
...

Hope this helps.

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 11:58 am, edited 5 times in total.

hscully
Posts: 6
Joined: Mon Aug 03, 2009 12:17 pm

Post by hscully »

That's extremely helpful, thank you. One more newbie question. How do I use audio voice files to read back an expression such as You entered <value expr="myfield"/> dollars?

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

IVR code example for <audio> tag

Post by support »

Hi hscully,

Here is an IVR code example using the IVR tag, <audio>, to help you with this:

audioprompt.php

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<var name="myfield" expr="75"/>
  <form>
    <block>
      <audio src="youentered.wav">
        You entered
      </audio>
      <value expr="myfield"/>
      <audio src="dollars.wav">
        dollars.
      </audio>
    </block>
  </form>
</vxml>
Hope this helps.

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 11:59 am, edited 4 times in total.

hscully
Posts: 6
Joined: Mon Aug 03, 2009 12:17 pm

Post by hscully »

That works fine, thank you. Is there any way to select a male voice for the TTS that renders the value?

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

updated IVR code example for male voice

Post by support »

Hi,

Yes, here's the updated IVR code example that uses the IVR tag, <voice>, in order to allow you to do this:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<var name="myfield" expr="75"/>
  <form>
    <block>
      <audio src="youentered.wav">
        You entered
      </audio>
      <prompt>
      <voice name="mike">
        <value expr="myfield"/>
      </voice>
      </prompt>
      <audio src="dollars.wav">
        dollars.
      </audio>
    </block>
  </form>
</vxml>
If you'd like more information on the types of TTS voices you can use for this, please see here: http://www.plumvoice.com/docs/dev/devel ... attributes

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 12:00 pm, edited 8 times in total.

hscully
Posts: 6
Joined: Mon Aug 03, 2009 12:17 pm

Post by hscully »

That's it. Thanks for the help.

Post Reply