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

plum voice options

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
msh
Posts: 9
Joined: Thu Aug 29, 2013 1:19 pm

plum voice options

Post by msh »

We are using your plum system. We have a resx file with all of the voice prompt bits just like the one below.

<data name="ARS_General_Digits_Five" xml:space="preserve">
<value>five</value>

Is there a way to have the value hold an audio file? The reason I ask is because I am converting the text to speech into serving up audio files.

I know I can add audio to a cshtml page using the following, but I would rather have them in a central file like with the text to speech.
<prompt>
<audio src=”website/file.wav”/>
</prompt>

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

Re: plum voice options

Post by support »

We need more information as we're a PHP shop and aren't familiar with how resx or cshtml files interact with VXML.

Could you post an example of your VXML app, specifically where it interacts with your resx and cshtml code?

msh
Posts: 9
Joined: Thu Aug 29, 2013 1:19 pm

Re: plum voice options

Post by msh »

In the cshtml file I have pieces that look like this:

Code: Select all

		else if (Model.LastAttemptWasTooFarInFuture) {
			<block>
				<prompt>@String.Format(Resources.Localization.ARS_AbsenceDate_Error_TooFarInFuture, Model.AbsenceLimit_DaysInFuture)</prompt>
			</block>
		}
When it hits the @ parts of the string, it will pull from the resx file.

The resx file has corresponding values that look like this:

Code: Select all

  <data name="ARS_AbsenceDate_Error_TooFarInFuture" xml:space="preserve">
    <value>I'm sorry. You can only enter an absence up to {0} days in advance.</value>
  </data>

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

Re: plum voice options

Post by support »

Right now, you're using

Code: Select all

@String.Format(Resources.Localization.ARS_AbsenceDate_Error_TooFarInFuture, Model.AbsenceLimit_DaysInFuture)
as a link to the string "I'm sorry. You can only enter an absence up to {0} days in advance," which is stored in your resx file. THis is so you can modify your resx file to change the prompts in your IVR.

If you use audio files, you can think of the audio filename, like "prompt.wav", as a link to the audio you wish to play. Your audio will be stored in your audio directory. To change the prompts in your IVR, you simply have to upload a new audio file with the same name.

Please let us know if we're misunderstanding your issue.

msh
Posts: 9
Joined: Thu Aug 29, 2013 1:19 pm

Re: plum voice options

Post by msh »

Would the audio have to go into the IVR file? Or could I store a link to it in the resx file?

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

Re: plum voice options

Post by support »

The audio filename would be in the IVR file. You may be able to store the filename in your resx file. This is how it would be done in PHP.

The IVR:

Code: Select all

<?php 
include('audio_filenames.php');

header('Content-type: text/xml');
echo '<?xml version="1.0"?>'; 
?>

<vxml version="2.0">
  <form>
    <block>
      <prompt>
	<audio src="<?= $prompt1 ?>"/> 
     </prompt>
    </block>
  </form>
</vxml>
audio_filenames.php, similar in concept to your resx file:

Code: Select all

<?php
$prompt1 = 'prompt1.wav';

?>
However, this is not standard practice. Usually the audio filenames in your VXML code remain static and to update your prompts, you upload new audio with the original filename, instead of dynamically loading audio filenames to your VXML code.

Post Reply