Jump to content

Talk function?


i542
 Share

Recommended Posts

This uses the beta

$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 believe if you search the scripts and scraps there is some scripts that use the release version, but requires writing/reading file(s).

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

This uses the beta

$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 believe if you search the scripts and scraps there is some scripts that use the release version, but requires writing/reading file(s).

Gary

<{POST_SNAPBACK}>

maybe 1,2,3

1 - Microsoft Mary
;1 - Microsoft Sam
;3 - Microsoft Mike

8)

NEWHeader1.png

Link to comment
Share on other sites

;) Is this importrant or not? If is that only a comment...

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

i542.

P.S. If is error in post, sorry.

Edited by i542

I can do signature me.

Link to comment
Share on other sites

In windows 98 not works.

In windows XP works.

;)

If I install SAPI 5.0 on 98 (my current version is 4.0), will be works?

I have 2 windows on 1 computer (crazy but it's true).

i542.

P.S. If is error in post, sorry.

I can do signature me.

Link to comment
Share on other sites

  • 9 months later...

The microsoft voices got to me so bad I invested in Audrey, a british accented voice from At&t's natural voice lab. Still isnt perfect but worlds apart from what windows comes with.

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

I believe that was made by erifash and enhanced by someone else. Correct me if I'm wrong.

http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
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...