VoiceGuide IVR Software Main Page
Jump to content

Two Languages

Recommended Posts

hi support team,

thanks for response for old my question , but I have big problem by use two languages in same script & in one call.

the two languages are ( Arabic - English ) , the method of speaking number in Arabic lang. is different than English one.

I changed the script file lib_num2wav successfully to meet my need for Arabic language but I need solution to work lib_num2wav file for two languages in the same script . eg : in the beginning call the caller can chose ( press 1 for Arabic or Press 2 for English ) if he press 1 then lib_num2wav will work for Arabic number arrangment , if he press 2 then lib_num2wav will work for English number arrangment.

please help me for that

thank a lot

bye

Share this post


Link to post

There are number of ways in which you can approach this, but the most straightforward one my be to modify the lib_num2wav.vbs further for it to generate the different WAV file play order string based on the value of Result Variable which holds the language selection value.

 

ie. if $RV[LanguageUsed] holds the selection of which language caller selected to use, then use the $RV[LanguageUsed] in the lib_num2wav.vbs to generate the .wav list.

 

I think right now you must have have defined a separate function in lib_num2wav.vbs for the Arabic version... so you have a separate "Function Number_Arabic(byval arg1)" yes?

 

What you should do is keep the one original function Function Number(byval arg1) and then in that function check for value of $RV[LanguageUsed] and if that value is set to the option corresponding to Arabic then generate the Arabic stream.

 

If you still have problems please post your lib_num2wav.vbs here (.ZIPed) and we can then advise better on how to change it.

Share this post


Link to post

thanks for fast reply. ......But...... I am sorry I don't understand the method u explaine for that ..... how can I put Arabic script & in Any section ? & where I can put the RV in the script ?

any way, I attached the two scripts ( Arabic & English ) but I don't know how to combine or collect them together ....

I hope to be patient with me

thanks

Share this post


Link to post

The function "Number" in both files seems to be the same.

 

What are the actual differences between the Arabic and the English versions?

Share this post


Link to post

I think the only difference I see is that in one version (Arabic) you have:

 

sNumber_WavList = s3_WavList & ",and.wav," & sNumber_WavList

 

and in the English version this line is written as:

 

sNumber_WavList = s3_WavList & "," & sNumber_WavList

 

 

 

What you should do is just edit the main lib_num2wav.vbs file replacing

 

sNumber_WavList = s3_WavList & "," & sNumber_WavList

 

with

 

if "$RV[LanguageUsed]"="2" then

sNumber_WavList = s3_WavList & ",and.wav," & sNumber_WavList

else

sNumber_WavList = s3_WavList & "," & sNumber_WavList

end if

 

Then if $RV[LanguageUsed] has a value of 2 then the Arabic version of forming the .wav list of numbers will be used.

 

If $RV[LanguageUsed] has a different value or is not defined then the English version will be used.

Share this post


Link to post

I don't change Function Number ...I changed athor parts like the following:

Function tens2wav(TensText)

on error resume next

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

 

 

 

 

or like here :

 

 

Function hundreds2wav(ByVal AmountToSay)

on error resume next

If Cint(AmountToSay) = 0 Then

Exit Function

End If

AmountToSay = Right("000" & AmountToSay, 3)

 

'Convert the hundreds place

If Mid(AmountToSay, 1, 1) <> "0" Then

Result = digit2wav(Mid(AmountToSay, 1, 1)) & ",hundred.wav,and.wav"

End If

 

'Convert the tens and ones place

If Mid(AmountToSay, 2, 1) <> "0" Then

s2_WavList = tens2wav(Mid(AmountToSay, 2))

Else

s2_WavList = digit2wav(Mid(AmountToSay, 3))

End If

 

If Result = "" Then

Result = s2_WavList

Else

Result = Result & "," & s2_WavList

End If

 

hundreds2wav = Result

End Function

 

 

 

or even here :

 

 

Function DateTimeDDMMHHNN(ByVal arg1)

arg1 = replace(arg1, "/", "")

arg1 = replace(arg1, ":", "")

arg1 = replace(arg1, ",", "")

arg1 = replace(arg1, " ", "")

If Len(arg1) < 8 Then

Exit Function

End If

 

sDDMM = Left(arg1,4)

sHHNN = Right(arg1,4)

 

DateTimeDDMMHHNN = DateDDMM(sDDMM) & ",and.wav," & TimeHHNN(sHHNN)

 

End Function

 

I just want to know how can I collect Arabic_lib_num2wav with lib_num2wav file.

thanks a lot

Share this post


Link to post

Same approach as outlined before would apply. Just change the main lib_num2wav.vbs file to use the different variations depending on the value of some RV which holds the language selection variable.

 

At this stage you can only have one lib_num2wav.vbs file for the entire system. At this stage you cannot indicate in SayNumber module which lib_num2wav.vbs to use.

Share this post


Link to post

thanks a lot looooooooool I posted the last reply befor I get your last reply looooooool , any way I will test this after some hours & I hope it will work.

thanks again for your fast response

bye

Share this post


Link to post

hi support team,

I changed the script & it work well for arrangment of speaking according to kind of language. but I have another problem & tried very much to solve it but I can't ..... the problem is : how can I tell the voice guide to recognize between English voice waves & Arabic or any other language voice waves. in another words for example :

in the end of section ( Converts a number from 10 to 99 into .Wavs ) in lib_num2wav.vbs file I put the following :

 

if "$RV[LanguageUsed]"="2" then

 

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

Else

Result = Result & "," & sDigitWav

End if

 

now if caller select 2 then ( Result = sDigitWav & ",and.wav," & Result ) will be activate & will play wave file corresponding with ( sDigitWav ) & ( and.wav ) & ( Result ) in Arabic language.

but if caller press 1 then ( Result = Result & "," & sDigitWav) will be activate but will play same files ( sDigitWav ) & ( and.wav ) & ( Result ) in Arabic language too & here is wrong ..... how can I make voice guide to run another wav files in English language in the same script ?

the problem is the two lines used same variables then every variable correspond with one wav file & this wav file in one language .....

please tell me r u have any idea to solve this problem ????? :wacko:

Share this post


Link to post
how can I make voice guide to run another wav files in English language in the same script ?

 

Selection of what 'system' files VoiceGuide should use during the running of the script is covered in the "Multi Language Systems" section of the Help file.

 

See the online copy of the relevant page here: http://www.voiceguide.com/vghelp/html/Multi-language.htm

 

Look at the $RV[DIRSYSTEMVOICE] variable. You just save the path to the system files you want VG to use in that variable.

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
×