Jump to content

How Change the language


Recommended Posts

;409 = English

;410 = Italian

Local $O_SPEECH = ObjCreate ("SAPI.SpVoice")

$VOICE = $o_speech.GetVoices ("", "Language=410").Item (0)

ConsoleWrite($voice.GetAttribute ("Language") & @CRLF)

i tried to change the language, but don't work!

Why?

I really need this!

please help me!

Here is a script I downloaded a while ago. It may help you.

$oMyError = ObjEvent("AutoIt.Error","MyErrFunc"); Install a custom error handler 

_TalkOBJ('This is auto it beta speaking.', 1)
_TalkOBJ('This is auto it beta speaking.', 2)
_TalkOBJ('This is auto it beta speaking.', 3)

;voice params:
;
;1 - Microsoft Mary
;1 - Microsoft Sam
;3 - Microsoft Mike

Func _TalkOBJ($s_text, $s_voice = 3)
    Local $o_speech = ObjCreate ("SAPI.SpVoice")
        Select
            Case $s_voice == 1
                $o_speech.Voice = $o_speech.GetVoices("Name=Microsoft Mary", "Language=409").Item(0)
            Case $s_voice == 2
                $o_speech.Voice = $o_speech.GetVoices("Name=Microsoft Mike", "Language=409").Item(0)
            Case $s_voice == 3
                $o_speech.Voice = $o_speech.GetVoices("Name=Microsoft Sam", "Language=409").Item(0)
        EndSelect
    $o_speech.Speak ($s_text)
    $o_speech = ""
EndFunc ;==>_TalkOBJ

; This is my custom error handler 
Func MyErrFunc() 
   $HexNumber=hex($oMyError.number,8) 
   Msgbox(0,"","We intercepted a COM Error !" & @CRLF & _
               "Number is: " & $HexNumber & @CRLF & _
               "Windescription is: " & $oMyError.windescription ) 

   SetError(1); something to check for when this function returns 
Endfunc

I did not write this but I cant remember who did.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...