Page 1 of 1

plum voice options

Posted: Thu Aug 29, 2013 1:28 pm
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>

Re: plum voice options

Posted: Fri Aug 30, 2013 8:32 am
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?

Re: plum voice options

Posted: Tue Sep 03, 2013 12:44 pm
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>

Re: plum voice options

Posted: Wed Sep 04, 2013 9:10 am
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.

Re: plum voice options

Posted: Wed Sep 04, 2013 9:15 am
by msh
Would the audio have to go into the IVR file? Or could I store a link to it in the resx file?

Re: plum voice options

Posted: Thu Sep 05, 2013 9:27 am
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.