VoiceGuide IVR Software Main Page
Jump to content

Saynumber Problem

Recommended Posts

Dear Sirs,

 

I am not able to get the following number to be said correctly.

 

2,055.40

 

When using number I get two hundred five thousand.....

When using Digit it just drops the decimal point

When using Amount Dollars - It adds dollars, which is not the correct units. Same for all the other amount cases.

 

I am sure I can write some complicated VBS to get me a string holding files to be played but it seems that there should be a case for this already as it is probably not that unusual

 

Scott Goldenberg

 

PS Will you be able to email me with the solution at ScottG@pepex.net. Thanks.

Share this post


Link to post

Existing releases do not handle any commas in the number well... VoiceGuide expects to be given a number like this: "2055.40" not "2,055.40"

 

This has been fixed in v4.9.1 of VoiceGuide so that commas no longer confuse it.

The attched vgmulti.exe update will play 2,055.40 correctly when "Amount Cents" or "Amount Cents, Decimal Point" is specified.

VgMulti_4.9.0_say_numbers_fix.zip

Share this post


Link to post

Thanks for the quick reply.

 

I will try the patch you sent.

 

Your reply makes me think that I was not clear in describing my problem.

 

The problem had to do with the decimal point not the comma. The number is passed in as "2055.36" or as "20553.6" both number are played the same way.

 

Sorry if I was not too clear.

 

Scott

 

PS I will reply when I get a chance to test this patch

Share this post


Link to post

Dear Sirs,

 

I installed the new version of vgmulti.exe and got the same results. I am inserting a list of items from the event log for your review.

 

95529 0 [D2_MoneyTransferPKR] Number Input

95529 0 [D2_MoneyTransferPKR] Playing (C:\Trio - IVR\Demo_Sounds\Demo2\D2_07-PRK.wav)

95579 0 PlaySoundStart ok [C:\Trio - IVR\Demo_Sounds\Demo2\D2_07-PRK.wav]

99445 0 Play End line[0] (id=695539)

99445 0 LsGetNbrsPlayWelcMsg EV_PLAY_FINISHED

02229 0 tapie monitordigits 50 2

02229 0 LsGetNbrsRxDigits [2]

02229 0 [D2_MoneyTransferPKR] Number Input 2

03080 0 tapie monitordigits 48 2

03090 0 LsGetNbrsRxDigits [0]

03090 0 [D2_MoneyTransferPKR] Number Input 20

03781 0 tapie monitordigits 48 2

03791 0 LsGetNbrsRxDigits [0]

03791 0 [D2_MoneyTransferPKR] Number Input 200

04532 0 tapie monitordigits 48 2

04532 0 LsGetNbrsRxDigits [0]

04532 0 [D2_MoneyTransferPKR] Number Input 2000

05383 0 tapie monitordigits 48 2

05383 0 LsGetNbrsRxDigits [0]

05383 0 [D2_MoneyTransferPKR] Number Input 20000

10581 0 tapie monitordigits 35 2

10591 0 LsGetNbrsRxDigits [#]

10591 0 fn PlaySoundStartNumbers C:\Program Files\VoiceGuide\system\voice\GetNbrsConfirmIntro.wav, C:\Program Files\VoiceGuide\system\voice\GetNbrsConfirmMenu.wav, 20000, Digits

10591 0 twcal PlaySayNumber C:\Program Files\VoiceGuide\system\voice\GetNbrsConfirmIntro.wav, C:\Program Files\VoiceGuide\system\voice\GetNbrsConfirmMenu.wav, 20000, , 1

10641 0 PlaySoundStartNumbers ok

 

Note at this time I have twenty thousand entered

21386 0 tapie monitordigits 49 2

21386 0 LsGetNbrsPlayConfirm [1]

22899 0 PlaySoundStop ok

22909 0 [D2_ComputeAmountPKR=PKR] Evaluate [$RV[D2_MoneyTransferPKR]]

22909 0 RVreplace start: [$RV[D2_MoneyTransferPKR]]

22919 0 RVreplace end: [20000]

22919 0 .Eval(20000)

22919 0 Eval Expr result:[20000] => [D2_ComputeAmount]

22919 0 [D2_ComputeAmountPKR-USD] Evaluate [$RV[D2_MoneyTransferPKR] / 55.50]

22919 0 RVreplace start: [$RV[D2_MoneyTransferPKR] / 55.50]

22919 0 RVreplace end: [20000 / 55.50]

22929 0 .Eval(20000 / 55.50)

22929 0 Eval Expr result:[360.36036036036] => [D2_ComputedUSD]

 

Note: At this point in time I have 360.36036036036

22929 0 RVreplace start: [$RV[D2_ComputeAmount]]

22929 0 RVreplace end: [20000]

22929 0 [D2_ConfirmAmount] Say numbers: 20000 as Amount Cents

22929 0 fn PlaySoundStartNumbers C:\Trio - IVR\Demo_Sounds\Demo2\D2_08-A.wav, C:\Trio - IVR\Demo_Sounds\Demo2\D2_08-B.wav, 20000, Amount Cents

22939 0 twcal PlaySayNumber C:\Trio - IVR\Demo_Sounds\Demo2\D2_08-A.wav, C:\Trio - IVR\Demo_Sounds\Demo2\D2_08-B.wav, 20000, , 12

22989 0 PlaySoundStartNumbers ok

 

Note: This plays as 200.00 dollars not twenty thousand

 

41315 0 Play End line[0] (id=722939)

41315 0 LsSayNbrPlay EV_PLAY_FINISHED

43378 0 tapie monitordigits 49 2

43378 0 LsSayNbrPlay [1]

43388 0 PlaySoundStop ok

43388 0 RVreplace start: [$RV[D2_ComputedUSD]]

43388 0 RVreplace end: [360.36036036036]

43388 0 [D2_FundingMethod1] Say numbers: 360.36036036036 as Amount Cents

43388 0 fn PlaySoundStartNumbers C:\Trio - IVR\Demo_Sounds\Demo2\D2_09-A.wav, C:\Trio - IVR\Demo_Sounds\Demo2\D2_09-B.wav, 360.36036036036, Amount Cents

43388 0 twcal PlaySayNumber C:\Trio - IVR\Demo_Sounds\Demo2\D2_09-A.wav, C:\Trio - IVR\Demo_Sounds\Demo2\D2_09-B.wav, 36036036036036, , 12

43488 0 PlaySoundStartNumbers ok

 

Note: This plays as 360 billion ...... 360.36 dollars

72510 0 Play End line[0] (id=743398)

72510 0 LsSayNbrPlay EV_PLAY_FINISHED

73431 0 LsSayNbrPlay EV_TIMEOUT_GOTOMODULE

73431 0 RVreplace start: [$RV[D2_ComputeAmount]]

73431 0 RVreplace end: [20000]

 

 

In addition to that I would like to be able to change the units from dollars to pesos to rupees to puonds ..... based on an earlier selection.

 

Scott

Share this post


Link to post

You should use the "Amount Cents, Decimal Point" option - not the "Amount Cents" option.

 

From VoiceGuide Help file:

 

Amount Cents  "12345" would be spoken as "one hundred twenty three dollars forty five cents". Amounts up to fourteen digits long will be spoken.

Amount Cents, Decimal Point "12" would be spoken as "twelve dollars zero cents". "12.3" would be spoken as "twelve dollars thirty cents". "12.34" would be spoken as "twelve dollars thirty four cents". Amounts up to fourteen digits long will be spoken.  

 

Which is what you are seeing in to "20000" case.

 

The previous version would still not play a number like 360.36036036036 correctly... as it was getting confused by the large number of digits after the decimal point. The attached version will play such numbers correctly.

 

You may also want to take a look at using Text to Speech - it offers even greater flexibility in how the number are spoken back and it will be easier to implement speaking back of different currencies as well... and when using a TTS engine like AT&T Natural Voices you will get very good sound quality....

VgMulti_4.9.0_say_numbers_fix_2.zip

Share this post


Link to post

After trying to use the new version and started dealling with currency issues.

 

I bit the bullet and wrote some code in VBS (yuck, ichy) and got a string that had a list of files to play.

 

Low an behold there was great joy I felt when I tested this and got the correct list of files. Saddly the joy was felt for a small amount of time. It seems that the code for playing a set of files is limited to 10 items or so I am guessing from the log file below

 

22038 0 Run Results >>>[CC_Amount]{3548.00}[CC_BaseDir]{C:\Program Files\VoiceGuide\system\voice}[CC_Currency]{dollars.wav}[CC_ReturnVariable]{D1_USDString}<<<

22038 0 [D1_ConvertToWavStringUSD] Running VB Script...

22078 0 VBScript Run waiting...

23080 0 Found result file: VGRUNRESULT_0.TXT

23080 0 Run Results >>>[D1_USDString]{C:\Program Files\VoiceGuide\system\voice.wav,C:\Program Files\VoiceGuide\system\voice\thousand.wav,C:\Program Files\VoiceGuide\system\voice.wav,C:\Program Files\VoiceGuide\system\voice\hundred.wav,C:\Program Files\VoiceGuide\system\voice.wav,C:\Program Files\VoiceGuide\system\voice.wav,C:\Program Files\VoiceGuide\system\voice\dollars.wav}<<<

23090 0 [D1_ConfirmUSD] Playing

23090 0 RVreplace start: [C:\Trio - IVR\Demo_Sounds\Demo1\Demo_pp_08-A.wav,$RV[D1_USDString],C:\Trio - IVR\Demo_Sounds\Demo1\Demo_pp_08-B.wav,$RV[D1_UserFile],C:\Trio - IVR\Demo_Sounds\Demo1\Demo_pp_08-C.wav]

23090 0 [D1_ConfirmUSD] Playing (C:\Trio - IVR\Demo_Sounds\Demo1\Demo_pp_08-A.wav,C:\Program Files\VoiceGuide\system\voice.wav,C:\Program Files\VoiceGuide\system\voice\thousand.wav,C:\Program Files\VoiceGuide\system\voice.wav,C:\Program Files\VoiceGuide\system\voice\hundred.wav,C:\Program Files\VoiceGuide\system\voice.wav,C:\Program Files\VoiceGuide\system\voice.wav,C:\Program Files\VoiceGuide\system\voice\dollars.wav,C:\Trio - IVR\Demo_Sounds\Demo1\Demo_pp_08-B.wav,C:\Trio - IVR\Demo_Sounds\MariaR.wav,C:\Trio - IVR\Demo_Sounds\Demo1\Demo_pp_08-C.wav)

23100 0 ERROR 4.9.1 RunModule:0:9:Subscript out of range:VgMulti

23100 0 HangupCall called from [Run module 3115]

23110 0 Hanging up call...

23110 0 PlaySoundStop ok

 

 

Now the simple case of 3548 could be handled in seperate called to the play module. Trouble is how do you hanlde

 

4 hundred severnty 3 billion 9 hundred eighty five million 7 hundred thirty seven thousand 1 hundred twenty two point seventy 3.

 

Just the number there would take up 22 file space.

 

I supose I can make a set of RV[d1_amount_count] then RV[d1_amount_1], RV[d1_amount_2], RV[d1_amount_3], .... RV[d1_amount_22] but this means all sorts of extra complications in the scripts to do looping with yet another RV.

 

Is there a better idea than this?

Share this post


Link to post

Each play module can only accept up to 10 queued sound files (separated by commas). Looking at this now this is a silly limit and I imagine that very soon this will be increased or the limit removed altogether...

 

The quickest workaround right now if you want to keep on using your VB Script is to generate the currency amounts using a series of RVs, with up to 10 sound files per RV and then play each RV from successive Play modules linked by "On Timeout=0" paths...

If you do not want an RV to play anything you can assign the word “none” to it.

 

What problems have you found with the VGMULTI.EXE replacement which was attached to previous post?

Share this post


Link to post

The main issue I have is that it does not deal with currecnies.

 

I was able to get the items to be said correctly with 'Dollars' always appended but when I need it to say 'Pesos' I had no solution.

 

The solution I found was to buy a program call Audiotools that I use the run module to execute. This program takes a series of wavs and merges them into one file. I use the device id to identify the file and that seems to work.

 

I also had some trouble using RVs in the play after section of Say Number module.

 

Scott

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
×