VoiceGuide IVR Software Main Page
Jump to content

Say Numbers Module

Recommended Posts

hi, I cant get the TTS to work possibly because im using the way2Call usb modem...

So, I have the caller able to query an access database and i want to return a phone number...

 

I have the say number module set to digits but it will say the word "minus" between area code etc...

Is there a way to let it know its a phone number?

 

I guess i could just put a blank wav in place of the system "minus.wav" file but wanted to check with you first...

Share this post


Link to post

where woudl i find teh fiel so that i can edit teh voices used for characters?

 

like, if there is a 5, VG plays the five.wav

 

but i want to add an ampersign (&) and make it play an "and.wav" wav.

Share this post


Link to post
I guess i could just put a blank wav in place of the system "minus.wav" file but wanted to check with you first...

Yes, that would work.

 

A better approach would be to edit the lib_num2wav.vbs file and add to it a new function which speaks the number and does not say the "minus" word when it encounters the minus sign. You would then be able to use this new function from within the script.

 

Have a look at:

http://www.voiceguide.com/vghelp/html/SoundFiles.htm and at: http://www.voiceguide.com/vghelp/html/Multi-language.htm

 

i want to add an ampersign (&) and make it play an "and.wav" wav.

Again, this would be best done by adding a new function to lib_num2wav.vbs

Share this post


Link to post

ok great I think that is what i am looking for....

 

Can you tell me how to add an additional "IF Statement"??? I just added another IF but it caused an error.. LOL im not a great programmer i guess. lolol

 

see below... how can i have two IFs ???? thanks

 

If sDigit = "-" Then

sWav = "minus.wav"

If sDigit = "+" Then

sWav = "and.wav"

Else

sWav = sDigit & ".wav"

end If

Share this post


Link to post

hey again. : ) I still need the above question answered (about having 2 IF statements), but here is a second question on the same topic....

 

 

Can I set the file up to ignore certain characters? example... When it comes across a space, it will play the file "errorPlayingFile.wav"... Plus I was thinking maybe i would just have it ignore the minus sign...

 

ok well thanks. : )

Share this post


Link to post
how can i have two IFs ????

Try this:

 

If sDigit = "-" Then

sWav = "minus.wav"

Else If sDigit = "&" Then

sWav = "and.wav"

Else

sWav = sDigit & ".wav"

end If

 

(we also replaced "+" with a "&" above).

 

A version which ignores characters other then 0-9,&,- would be:

 

If sDigit = "-" Then

sWav = "minus.wav"

Else If sDigit = "&" Then

sWav = "and.wav"

Else If sDigit >= "0" and sDigit < "9"

sWav = sDigit & ".wav"

end If

 

This may be a more appropriate version for you to use if the input may have unexpected characters in it. It will ensure that only the expected characters get played.

We will probably modify the default lib_num2wav.vbsfunctions to have the If sDigit >= "0" and sDigit < "9" test in there - we can see that not having that test there may lead to problems.

Share this post


Link to post

damn.. not working... im getting script errors...

 

one refers to script:\temp\vbs_6_sayNumber.vbs????

 

i get expected "then"...

 

i put a then in there, & get "unexpected next"

 

can you tell me the whole function code:

 

 

heres what i have as my function.. can u fix it for me? : )

 

Function Digits(byval arg1)

'returns a list of comma delimited wav files,

'with each wav file corresponding to a character

'in the supplied input string.

 

sDigits=Trim(arg1)

For i=1 To Len(sDigits)

sDigit = Mid(sDigits, i, 1)

If sDigit = "-" Then

sWav = "silence.wav"

Else If sDigit = "&" Then

sWav = "and.wav"

Else If sDigit >= "0" and sDigit < "9" then

sWav = sDigit & ".wav"

end If

If sOut = "" Then

sOut = sWav

else

sOut = sOut & "," & sWav

End if

Next

Digits = sOut

 

End Function

Share this post


Link to post

The script should have been tested before it was posted...

here is a version I tested:

 

Function Digits(byval arg1)

'returns a list of comma delimited wav files,

'with each wav file corresponding to a character

'in the supplied input string.

 

sDigits=Trim(arg1)

For i=1 To Len(sDigits)

sDigit = Mid(sDigits, i, 1)

If sDigit = "-" Then

sWav = "silence.wav"

ElseIf sDigit = "&" Then

sWav = "and.wav"

ElseIf sDigit >= "0" and sDigit < "9" then

sWav = sDigit & ".wav"

else

sWav = ""

end If

if sWav <> "" Then

If sOut = "" Then

sOut = sWav

else

sOut = sOut & "," & sWav

End if

End if

Next

Digits = sOut

 

End Function

 

Notice how "Else If" is now "ElseIf" (no space) and there is an extra few lines here and there...

Share this post


Link to post

Yes thanks! This works perfectly!

 

: ) Im happy.. now i can go to sleep. LOL

 

Thanks alot!

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
×