VoiceGuide IVR Software Main Page
Jump to content

How To Make Vg Speaks Voice Files In Another Language

Recommended Posts

Hi Support,

 

I am recording voice files in dutch language.

 

In english you speak "24" as twenty four

In dutch you speak "24" as vier en twintig

 

Voice guide speaks "24" as twenty four. In the voice files folder you don't have the number "24" but "20" and "4"

If I record the number "4" in dutch and the number "20", Voice Guide is speaking the sound files as:

 

twintig (waits) and then speaks vier.

 

How must I do this?

 

Thank you in advanced.

 

Regards

Share this post


Link to post

from http://www.voiceguide.com/vghelp/html/modSayNumber.htm :

Users can edit the way in which the numbers are spoken, or even add their own Say Number functions by editing the file: lib_num2wav.vbs located in VoiceGuide's \system\vbs\ subdirectory. This is useful if it is required to say numbers/amounts in a language other then English.

 

Please read the lib_num2wav.vbs file for more information.

Share this post


Link to post

Hi Support,

 

Thank you for the reply. I read the lib_num2wav.vbs file but I can't get it.

I want the system to speak 24 as four and twenty.

In dutch we say vier (4) en (and) twintig (20) : vier en twintig

The system speaks: twintig (20) vier (4).

 

I looked at this part:

----------------------------------------------------------------------------------------------------------------------------

 

'######

'name : Number

'info : Say the number

'arg1 : Number to be spoken :

'######

Function Number(byval arg1)

'returns a list of comma delimited wav files,

'with each wav file corresponding to a character

'in the supplied input string.

'any commas in the number are ignored - they are deleted before the number is spoken.

 

sNumberTrimmed = Trim(arg1)

sNumber = replace(sNumberTrimmed, ",", "")

 

Dim Place(9)

Place(2) = "thousand.wav"

Place(3) = "million.wav"

Place(4) = "billion.wav"

Place(5) = "trillion.wav"

 

 

' Position of decimal place 0 if none

iDecimalPlacePos = InStr(sNumber, ".")

 

If iDecimalPlacePos > 0 Then

sAfterDecimalPoint_WavList = Digits(Mid(sNumber, iDecimalPlacePos + 1, 100))

sNumber = Left(sNumber, iDecimalPlacePos - 1)

End If

 

If Left(sNumber, 1) = "-" Then

iNumberIsNegative = 1

sNumber = Mid(sNumber, 2, Len(sNumber-1))

else

iNumberIsNegative = 0

End If

 

iCount = 1

'we will create the WAV list of sound files starting from

'the back of the number.

Do While sNumber <> ""

s3_WavList = hundreds2wav(Right(sNumber, 3))

If s3_WavList <> "" Then

If iCount > 1 Then

s3_WavList = s3_WavList & "," & Place(iCount)

End If

If sNumber_WavList = "" Then

sNumber_WavList = s3_WavList

Else

sNumber_WavList = s3_WavList & "," & sNumber_WavList

End If

End If

If Len(sNumber) > 3 Then

sNumber = Left(sNumber, Len(sNumber) - 3)

Else

sNumber = ""

End If

iCount = iCount + 1

Loop

 

If sAfterDecimalPoint_WavList = "" Then

if sNumber_WavList = "" then

Number = "0.wav"

else

Number = sNumber_WavList

end if

Else

Number = sNumber_WavList & ",point.wav," & sAfterDecimalPoint_WavList

end if

 

if iNumberIsNegative = 1 then

Number = "minus.wav," & Number

end if

 

End Function

----------------------------------------------------------------------------------------------------------------------------

 

I have no idea what to do. Can someone help me please.

Must I changed the whole vbs file?

 

I do this:

 

name : Number

info : Say the number

arg1 : Number to be spoken :

 

Any help needed please.

Share this post


Link to post

I think what you should actually be changing is the tens2wav function.

 

From your description I think the below version should do it (see the text in bold - that's the only change made :

 

'*********************************************

' Converts a number from 10 to 99 into .Wavs *

'*********************************************

Function tens2wav(TensText)

on error resume next

if len(TensText) = 1 then

Result = digit2wav(Right(TensText, 1))

tens2wav = Result

exit function

end if

 

Result = "" 'null out the s3_WavListorary function value

If CInt(Left(TensText, 1)) = 1 Then

' If value between 10-19

Select Case CInt(TensText)

Case 10: Result = "10.wav"

Case 11: Result = "11.wav"

Case 12: Result = "12.wav"

Case 13: Result = "13.wav"

Case 14: Result = "14.wav"

Case 15: Result = "15.wav"

Case 16: Result = "16.wav"

Case 17: Result = "17.wav"

Case 18: Result = "18.wav"

Case 19: Result = "19.wav"

Case Else

End Select

Else

' If value between 20-99

Select Case CInt(Left(TensText, 1))

Case 2: Result = "20.wav"

Case 3: Result = "30.wav"

Case 4: Result = "40.wav"

Case 5: Result = "50.wav"

Case 6: Result = "60.wav"

Case 7: Result = "70.wav"

Case 8: Result = "80.wav"

Case 9: Result = "90.wav"

Case Else

End Select

sDigitWav = digit2wav(Right(TensText, 1)) 'Retrieve ones place

If sDigitWav <> "" Then

If Result = "" Then

Result = sDigitWav

Else

Result = sDigitWav & ",and.wav," & Result

End If

End If

End If

tens2wav = Result

End Function

 

Let us know if this is sufficient of of there are other changes that are needed.

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
×