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

How to use say-as for numbers in UK

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
sasa
Posts: 8
Joined: Mon Dec 27, 2010 5:36 am

How to use say-as for numbers in UK

Post by sasa »

Hi,

I'm having difficulties to use the say-as tag. According to documentation, alot of it does not work in UK. Does this mean as long as it is forwarded from UK number, say-as number, acrnom, telephone will never work? Is there a solution ?
<say-as type="number"> 628123456770</say-as>
I have IVR numbers from UK forwarded to france and it works with type "telephone" but it does not work with this. Please advice.

Thank You
sasa
Thu 02 Feb 2012 05:12:17 AM EST:
Click here to view saved VoiceXML script
Loading Builtin grammar: builtin:dtmf/digits?minlength=1;maxlength=1
VXI::queue_prompts()
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak><voice name="Julie"><speak> You are about to send 1 Pounds to <say-as type="number"> 628123456770</say-as> . which will be worth 5000 Rupiah of mobile minutes. Please press 1 to confirm or 0 to cancel</speak></voice></speak>
---------
VXI::field_element - activating grammars for form = 'getInput' formitem = 'confirm'

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

Re: How to use say-as for numbers in UK

Post by support »

Hi sasa,

Are you looking to say back a number as a string of digits? If so, you will need to prepend commas within the number so that they can be read back as digits.

Below is a VXML example that demonstrates how you can do this:

Code: Select all

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

<vxml version="2.0">

<var name="somenumber" expr="628123456770"/>

<form>
<block>
<prompt>
<speak xml:lang="en-GB">
<voice name="Emily" gender="female">
<value expr="somenumber.toString().replace(/(.)/g, '$1, ')"/>
</voice>
</speak>
</prompt>

</block>
</form>
</vxml>
Hope this helps.

Regards,
Plum Support

sasa
Posts: 8
Joined: Mon Dec 27, 2010 5:36 am

Re: How to use say-as for numbers in UK

Post by sasa »

Hi,

I tried with comas but the voice speaks like this
six coma two coma eight coma one coma two coma three coma four coma five coma six coma seven coma seven coma
<say-as type="number">6,2,8,1,2,3,4,5,6,7,8,0,</say-as>
It behaves the same way with <say-as type="acronym"> and <say-as type="telephone"> on TTS engine AT&T Natural Voices 1.4 , Nuance RealSpeak 4.0

Cepstral Swift 4.1 worked with type="Number" but the voice is bad and sounds like breaking up in chunks. The best voice for english I have found is Nuance RealSpeak. I hope we can get this to work on Nuance RealSpeak.

Funny thing is, type="telephone" worked on a number we have located in US - Boston, MA without comas.

Code: Select all

Fri Feb  3 01:19:04 2012 : (26927) IVR(en) - <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.0" ><property name="inputmodes" value="dtmf"/><property name="interdigittimeout" value="5s"/><form id="getInput"><field name="confirm" type="digits?minlength=1;maxlength=1"><prompt><voice name="Julie">You are about to send 1 Pounds to <say-as type="number">6,2,8,1,2,3,4,5,6,7,8,0,</say-as>. which will be worth 5000 Rupiah of mobile minutes. Please press 1 to confirm or 0 to cancel</voice></prompt></field><noinput>Sorry I did not hear you.<reprompt/></noinput><noinput count="2">I didnt hear you that time either.<reprompt/></noinput><noinput count="3">Sorry, I can't hear you, please try you call again later. Goodbye.<disconnect/></noinput><nomatch><prompt><speak xml:lang="en-US"><voice name="Tom">Sorry I did not understand you<break/> </voice></speak></prompt>><reprompt/></nomatch><nomatch count="2"><prompt><voice name="Tom">The Pin is still not being recognized<break/> please try again later</voice></prompt><disconnect/></nomatch><block><submit namelist="session.telephone.ani confirm session.telephone.dnis session.id" next="vxml_plum_uk.pl"/></block></form></vxml>

sasa
Posts: 8
Joined: Mon Dec 27, 2010 5:36 am

Re: How to use say-as for numbers in UK

Post by sasa »

Hi,

I found a good voice with Mille using Cepstral Swift 4.1 . We are good for now.

Thank you for help!
sasa

cajaske
Posts: 2
Joined: Sat Aug 25, 2012 3:39 pm

Re: How to use say-as for numbers in UK

Post by cajaske »

If you're going to be separating the numbers with commas, you're going to want to put spaces between them, like "8, 0, 0, 8, 6, 7, 5, 3, 0, 9," so it doesn't speak out "comma" every time.. The problem I'm having is I'm using a <field> and having it say back the value entered, so I can't just add commas. Any suggestions?

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

Re: How to use say-as for numbers in UK

Post by support »

Hi,

Here is a code example that may help you with what you're looking for:

pinnumber.php

Code: Select all

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

<vxml version="2.0">
  <form id="getpin">
    <field name="pinnumber" type="digits?length=4">
      <prompt>
        Please enter your pin number.
      </prompt>
      <filled>
        <prompt>
          You entered <value expr="pinnumber.toString().replace(/(.)/g, '$1, ')"/>
        </prompt>
      </filled>
    </field>
  </form>
</vxml>
Regards,
Plum Support

cajaske
Posts: 2
Joined: Sat Aug 25, 2012 3:39 pm

Re: How to use say-as for numbers in UK

Post by cajaske »

Worked perfectly. Thank you very much!

clark5901
Posts: 1
Joined: Wed Jan 23, 2013 5:51 am

Re: How to use say-as for numbers in UK

Post by clark5901 »

Thanks for the nice information in this post dear...
clark

Post Reply