VoiceGuide IVR Software Main Page
Jump to content

Percent

Recommended Posts

How do you say 25.24% in your Porduct?

The only way I can get close is using number and say 2524.

Erv

Share this post


Link to post

The speaking of percentages is not immediately supported in the "Say Numbers" module, but you can use two "Say Numbers" modules one after another to make the script do what you need:

 

Have the first Say Numbers module speak the number before the decimal point, then have the second Say Numbers module say "point", then speak the two digits after the decimal point and then say "percent".

 

This requires you to be able to split up a number into its pre-decimal and post-decimal components first.

Splitting of the number can be done using the split function of VBScript

 

in VBScript Module:

 

set vg = CreateObject("VoiceGuide.CommandLink")
aTwoHalves = split("$RV[RetrievedNumber]")
vg.RvSet $RV_LINEID , "PreDecimal", aTwoHalves(0)
vg.RvSet $RV_LINEID , "PostDecimal", aTwoHalves(1)
vg.Run_ResultReturn $RV_LINEID, "success"
set vg = Nothing

 

where $RV[RetrievedNumber] can be replaced by whatever Result Variable is the original number to be spoken as a percentage...

 

Then $RV[PreDecimal] can be used in the first Say Numbers module, and $RV[PostDecimal] can be used in the second Say Numbers module.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×