Page 1 of 1

Application not letting me upload audio to repository

Posted: Thu Sep 24, 2009 6:53 pm
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?

Plum IVR Audio Repository

Posted: Fri Sep 25, 2009 9:53 am
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

Posted: Fri Sep 25, 2009 2:23 pm
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?

IVR code example for <audio> tag

Posted: Fri Sep 25, 2009 3:06 pm
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

Posted: Fri Sep 25, 2009 4:22 pm
by hscully
That works fine, thank you. Is there any way to select a male voice for the TTS that renders the value?

updated IVR code example for male voice

Posted: Fri Sep 25, 2009 4:33 pm
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

Posted: Sat Sep 26, 2009 9:40 am
by hscully
That's it. Thanks for the help.