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

<say-as> tag in Spanish

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

<say-as> tag in Spanish

Post by shanthint@paydq.com »

Hello,
We have spanish engine installed recently. The name is 'Paulina'.
The <say-as> tag with type -'currency' is not working for spanish.
The same code is working in English.
I have included the code snippet with this.
I am not sure whether I need to add something with this to make the spanish engine speaks dollar amount.

code:

<prompt>
<voice name="Paulina" xml:lang="es-MX">
<prosody volume="loud">
<say-as type="currency"><value expr="'$'+fieldvalue"/></say-as>
</prosody>
</voice>
</prompt>

Thank you.

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

IVR code for Realspeak TTS engine

Post by support »

Hi,

Here is some sample IVR code that will help you use the <say-as> "currency" attribute for the Realspeak TTS engine:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <var name="fieldvalue" expr="2"/>
    <block>
      <prompt>
        <speak xml:lang="es-MX"><voice name="Paulina" gender="female">
         <prosody volume="200.0">
           Usted quiere pasar <say-as type="currency"><value expr="'$'+fieldvalue"/></say-as>.
         </prosody>
        </voice></speak>
      </prompt>
    </block>
  </form>
</vxml>
Hope this helps.

Regards,
Plum Support
Last edited by support on Mon Jan 11, 2010 12:52 pm, edited 2 times in total.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

Hi,
This code works fine. But in my application, the prompt is inside filed tag and it still says one point zero zero dollar instead of one dollar.
Inside the application the same code is not working.
Please take a look at this code and let me know what I am doing wrong.

code:

<field name="verifyInput" type="boolean" >

<prompt>
<speak xml:lang="es-MX">
<voice name="Paulina" gender="female">
<prosody volume="loud">
<say-as type="currency"><value expr="'$'+fieldvalue"/></say-as>
</prosody>
</voice>
</speak>
</prompt>

<prompt>

<audio expr="'recordings/'+language+'/'+'global/verbiage/ver_this_correct.wav'" ></audio>
<audio expr="'recordings/'+language+'/'+'global/pause.wav'"></audio>
<audio expr="'recordings/'+language+'/'+'global/verbiage/ver_to_tryagain.wav'" ></audio>

</prompt>
</field>

Thanks

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

IVR code issue needs to be clarified

Post by support »

Hi,

Could you provide with more detail as to where your <var> "fieldvalue", is coming from? We have found that the following IVR code still works correctly:

currency.php

Code: Select all

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

<vxml version="2.0">

<var name="fieldvalue" expr="2"/>
<form>
<field name="verifyInput" type="boolean" >

<prompt>
<speak xml:lang="es-MX">
<voice name="Paulina" gender="female">
<prosody volume="loud">
<say-as type="currency"><value expr="'$'+fieldvalue"/></say-as>
</prosody>
</voice>
</speak>
</prompt>

</field>
</form>
</vxml>
where the system says "dos dolares". If you could provide us with more detail as to how you are getting "one point zero zero dollar", this would help us greatly in debugging your IVR issue.

Regards,
Plum Support
Last edited by support on Wed Feb 17, 2010 12:51 pm, edited 5 times in total.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

Hi,
I noticed that the fieldvalue variable is set to String value. The English engine 'Donna' says the amount correct. BUt not the spanish engine.
SO I changed it to integer. Even now the Eglish engine says it well.
Spanish engine say the amount correct only if it is a whole number.
For example for $1.00 it says one dollar but for $1.50 it says one dollar point five zero.
Is that something we should change in the engine itself or do we have try some work around to do this.

Thank you.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

hello,
actually I ma getting 'Uno punto zero zero ' not in English.

thank you.

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

IVR code and limits of Realspeak's TTS engine

Post by support »

Hi,

You will have to preparse the "$1.00" on your end of IVR code into Spanish as "Uno dolares" because you will not be able to rely on Realspeak to handle the translation. This is due to a limitation of Realspeak's TTS engine.

Regards,
Plum Support
Last edited by support on Mon Jan 11, 2010 12:54 pm, edited 2 times in total.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

Hello,
our spanish engine can translate any whole number to dollar amount. for example $1.00 to 'Uno dolares'.
But it can not translate dollar and cents like $1.50 to 'un dolar con cincuenta centavos' instead it is translating as 'uno punto cincuenta dolares'. so is preparsing the only way to make it work?
I am just wondering how english engine can work for that not the spanish engine.

Thank you.

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

IVR issue with translation and Realspeak engine

Post by support »

Hi,

Sorry, but this is just the behavior of specifically the Realspeak engine when translating currency into Spanish. The only way to work around it is to pre-parse the currency amount for your IVR code.

Regards,
Plum Support

Post Reply