Page 1 of 1

Spanish Prompts

Posted: Thu Sep 13, 2012 2:15 pm
by hecleal
We are working on a VXML file that will handle callers that speak spanish. We do not have a problem creating the wav/mp3 files for most prompts, but we are returning the call time to the users. Using a PHP function, we are able to get the time but it is read in English.

Can you suggest the prefered way to resolve this issue? Here is our php script (all wording will be switched out for mp3 files, except the time):

Code: Select all

<?php
  header("Content-type: text/xml");
  echo("<?xml version=\"1.0\"?>\n");
  $PTime = $_GET['PTime'];
?>

<vxml version="2.0">
  <form>
    <block>	
      <if cond="'<?php echo($PTime)?>'=='Error'">	
        <prompt>
          Error Found. Please try again. Good Bye!
        </prompt>
      <else/>
        <prompt>
          Thank you! Call placed at:  <?php echo($PTime)?>. Good Bye!
        </prompt>
      </if> 		 
    </block>
  </form>
</vxml>
Thanks for you help.

Re: Spanish Prompts

Posted: Thu Sep 13, 2012 2:37 pm
by support
You can use the <voice> tag to change the TTS engine's language like so:

Code: Select all

<prompt>Thank you! Call placed at:  <voice xml:lang="es-MX"><?php echo($PTime)?></voice>. Good Bye!</prompt>
Make sure the value of your xml:lang attribute matches the TTS engine you are using. You can look up which languages are available for each TTS engine here: http://www.plumvoice.com/docs/dev/devel ... erence:tts