Sign in to follow this  
Followers 0
i542

Some questions about _Talk

19 posts in this topic

Hi,

I don't know how to made computer stop talk! Here is script:

_Talk("I am text and script must be continued")
Func _Talk($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

Here is what I can't do:

  • Made script continue running while text is reading
  • Stop text
Some help?

i542


I can do signature me.

Share this post


Link to post
Share on other sites



Hi,

maybe you find something here : http://bdn.borland.com/article/29583

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Not sure about stop the speech while it is in progress, but you could speed it along so it does not take too long to finish.

Some more options available to use.

Func _Say($sText, $iRate = 1, $iVolume = 100)
    If $iRate > 10 Or $iVolume > 100 Then Return
    Local $oTalk = ObjCreate('SAPI.SpVoice')
    If Not @error Then
        $oTalk.Rate = $iRate
        $oTalk.Volume = $iVolume
        $oTalk.Speak($sText)
    EndIf
EndFunc

:whistle:

Share this post


Link to post
Share on other sites

What i would do....

1

Compile the "Talk" script with command line option

2

fileinstall the "talk" program into the main program

3

Have the main program Run( "Talk.exe " & $words_to_speak)

4

Have the main program "lower" the volume when needed

( has the same effect as "stopping" the speach )

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

_Talk("I am text and script must be continued")
Func _Talk($s_text, $s_voice = 3)
    Local Const $SVSFlagsAsync = 1
    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, $SVSFlagsAsync)
    $o_speech.WaitUntilDone(1000)
     $o_speech.Pause ()
    $o_speech = ""
EndFunc  ;==>_TalkOBJ
oÝ÷ Ù«­¢+Ø)}Q±¬ ÅÕ½Ðí$´ÑáйÍÉ¥ÁеÕÍн¹Ñ¥¹ÕÅÕ½Ðì¤)Õ¹}Q±¬ ÀÌØíÍ}ÑáаÀÌØíÍ}Ù½¥ô̤(%1½°
½¹ÍÐÀÌØíMYM±ÍÍå¹ôÄ(1½°ÀÌØí½}ÍÁ ô=©
ÉÑ ÅÕ½ÐíMA$¹MÁY½¥ÅÕ½Ðì¤(M±Ð(
ÍÀÌØíÍ}Ù½¥ôôÄ(ÀÌØí½}ÍÁ ¹Y½¥ôÀÌØí½}ÍÁ ¹ÑY½¥Ì ÅÕ½Ðí9µõ5¥É½Í½Ð5ÉäÅÕ½Ðì°ÅÕ½Ðí1¹ÕôÐÀäÅÕ½Ð줹%Ñ´ À¤(
ÍÀÌØíÍ}Ù½¥ôôÈ(ÀÌØí½}ÍÁ ¹Y½¥ôÀÌØí½}ÍÁ ¹ÑY½¥Ì ÅÕ½Ðí9µõ5¥É½Í½Ð5¥­ÅÕ½Ðì°ÅÕ½Ðí1¹ÕôÐÀäÅÕ½Ð줹%Ñ´ À¤(
ÍÀÌØíÍ}Ù½¥ôôÌ(ÀÌØí½}ÍÁ ¹Y½¥ôÀÌØí½}ÍÁ ¹ÑY½¥Ì ÅÕ½Ðí9µõ5¥É½Í½ÐM´ÅÕ½Ðì°ÅÕ½Ðí1¹ÕôÐÀäÅÕ½Ð줹%Ñ´ À¤($$$¹M±Ð(ÀÌØí½}ÍÁ ¹MÁ¬ ÀÌØíÍ}ÑáаÀÌØíMYM±ÍÍ幤($ÀÌØí½}ÍÁ ¹]¥ÑU¹Ñ¥±½¹ ÔÀÀ¤($ÀÌØí½}ÍÁ ¹AÕÍ ¤($M±À ÌÀÀÀ¤($ÀÌØí½}ÍÁ ¹IÍÕµ ¤($ÀÌØí½}ÍÁ ¹]¥ÑU¹Ñ¥±½¹ ´Ä¤(ÀÌØí½}ÍÁ ôÅÕ½ÐìÅÕ½Ðì)¹Õ¹ìôôÐí}Q±­=  (

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

What i would do....

1

Compile the "Talk" script with command line option

2

fileinstall the "talk" program into the main program

3

Have the main program Run( "Talk.exe " & $words_to_speak)

4

Have the main program "lower" the volume when needed

( has the same effect as "stopping" the speach )

8)

I would do the same only instead of lowering the volume I would do a killproccess to it

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

_Talk("I am text and script must be continued." & @LF & "This is another sentence.")
Func _Talk($s_text, $s_voice = 3)
    Local Const $SVSFlagsAsync = 1
    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, $SVSFlagsAsync)
    $o_speech.WaitUntilDone(50)
     $o_speech.Skip ("Sentence", 1)
     $o_speech.WaitUntilDone(-1)
    $o_speech = ""
EndFunc  ;==>_TalkOBJ


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites
_Talk("I am text and script must be continued")
Func _Talk($s_text, $s_voice = 3)
    Local Const $SVSFlagsAsync = 1
    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, $SVSFlagsAsync)
    $o_speech.WaitUntilDone(1000)
     $o_speech.Pause ()
    $o_speech = ""
EndFunc  ;==>_TalkOBJ
oÝ÷ Ù«­¢+Ø)}Q±¬ ÅÕ½Ðí$´ÑáйÍÉ¥ÁеÕÍн¹Ñ¥¹ÕÅÕ½Ðì¤)Õ¹}Q±¬ ÀÌØíÍ}ÑáаÀÌØíÍ}Ù½¥ô̤(%1½°
½¹ÍÐÀÌØíMYM±ÍÍå¹ôÄ(1½°ÀÌØí½}ÍÁ ô=©
ÉÑ ÅÕ½ÐíMA$¹MÁY½¥ÅÕ½Ðì¤(M±Ð(
ÍÀÌØíÍ}Ù½¥ôôÄ(ÀÌØí½}ÍÁ ¹Y½¥ôÀÌØí½}ÍÁ ¹ÑY½¥Ì ÅÕ½Ðí9µõ5¥É½Í½Ð5ÉäÅÕ½Ðì°ÅÕ½Ðí1¹ÕôÐÀäÅÕ½Ð줹%Ñ´ À¤(
ÍÀÌØíÍ}Ù½¥ôôÈ(ÀÌØí½}ÍÁ ¹Y½¥ôÀÌØí½}ÍÁ ¹ÑY½¥Ì ÅÕ½Ðí9µõ5¥É½Í½Ð5¥­ÅÕ½Ðì°ÅÕ½Ðí1¹ÕôÐÀäÅÕ½Ð줹%Ñ´ À¤(
ÍÀÌØíÍ}Ù½¥ôôÌ(ÀÌØí½}ÍÁ ¹Y½¥ôÀÌØí½}ÍÁ ¹ÑY½¥Ì ÅÕ½Ðí9µõ5¥É½Í½ÐM´ÅÕ½Ðì°ÅÕ½Ðí1¹ÕôÐÀäÅÕ½Ð줹%Ñ´ À¤($$$¹M±Ð(ÀÌØí½}ÍÁ ¹MÁ¬ ÀÌØíÍ}ÑáаÀÌØíMYM±ÍÍ幤($ÀÌØí½}ÍÁ ¹]¥ÑU¹Ñ¥±½¹ ÔÀÀ¤($ÀÌØí½}ÍÁ ¹AÕÍ ¤($M±À ÌÀÀÀ¤($ÀÌØí½}ÍÁ ¹IÍÕµ ¤($ÀÌØí½}ÍÁ ¹]¥ÑU¹Ñ¥±½¹ ´Ä¤(ÀÌØí½}ÍÁ ôÅÕ½ÐìÅÕ½Ðì)¹Õ¹ìôôÐí}Q±­=  (oÝ÷ Ûú®¢×­+0¢é]²0Ö޶׫jëh×6
_Talk("I am text and script must be continued")
ConsoleWrite("Doing something")
$o_speech.WaitUntilDone(500)
$o_speech.Pause ()
Sleep(2000)
ConsoleWrite("LALALA")
$o_speech.Resume ()
ConsoleWrite("Doing something ELSE")
$o_speech.WaitUntilDone(-1)
$o_speech = ""


Func _Talk($s_text, $s_voice = 3)
    Local Const $SVSFlagsAsync = 1
    Global $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, $SVSFlagsAsync)
EndFunc  ;==>_TalkOBJ

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

I would do the same only instead of lowering the volume I would do a killproccess to it

No need to.


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

this would show it better,

_Talk("I am text and script must be continued")
ConsoleWrite("Doing something")
$o_speech.WaitUntilDone(500)
$o_speech.Pause ()
Sleep(2000)
ConsoleWrite("LALALA")
$o_speech.Resume ()
ConsoleWrite("Doing something ELSE")
$o_speech.WaitUntilDone(-1)
$o_speech = ""
Func _Talk($s_text, $s_voice = 3)
    Local Const $SVSFlagsAsync = 1
    Global $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, $SVSFlagsAsync)
EndFunc  ;==>_TalkOBJ
I agree, was thinking the same thing, just too lazy today.

http://msdn.microsoft.com/library/en-us/SA...e_Interface.asp

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

lol, that is great though, I didnt even know you could do that.

BTW: Has anyone tried Speech recognition too?


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Thought I would throw together a little GUI example

#include <GUIConstants.au3>

Opt("MustDeclareVars", 1)

_Main()

Func _Main()
    Local $GUI, $edit, $btn_Pause, $btn_Skip, $btn_Stop, $btn_Talk, $msg
    Local $o_speech = ObjCreate("SAPI.SpVoice")

    $GUI = GUICreate("SAPI SpVoice", 500, 220, 192, 125)
    $edit = GUICtrlCreateEdit("AutoIt v3 is a freeware BASIC-like scripting language designed for automating the" & @CRLF & _
            "Windows GUI.  It uses a combination of simulated keystrokes, mouse movement and" & @CRLF & _
            "window/control manipulation in order to automate tasks in a way not possible or reliable" & @CRLF & _
            "with other languages (e.g. VBScript and SendKeys).", 10, 10, 480, 100)

    $btn_Talk = GUICtrlCreateButton("Talk", 155, 150, 90, 25)
    $btn_Stop = GUICtrlCreateButton("Stop", 255, 150, 90, 25)
    GUICtrlSetState($btn_Stop, $GUI_DISABLE)
    $btn_Pause = GUICtrlCreateButton("Pause", 155, 180, 90, 25)
    GUICtrlSetState($btn_Pause, $GUI_DISABLE)
    $btn_Skip = GUICtrlCreateButton("Skip", 255, 180, 90, 25)
    GUICtrlSetState($btn_Skip, $GUI_DISABLE)

    GUISetState(@SW_SHOW)

    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $btn_Talk
                _Talk($o_speech, GUICtrlRead($edit))
                GUICtrlSetState($btn_Stop, $GUI_ENABLE)
                GUICtrlSetState($btn_Pause, $GUI_ENABLE)
                GUICtrlSetState($btn_Skip, $GUI_ENABLE)
                GUICtrlSetState($btn_Talk, $GUI_DISABLE)
            Case $msg = $btn_Pause
                If GUICtrlRead($btn_Pause) = "Pause" Then
                    $o_speech.Pause ()
                    GUICtrlSetData($btn_Pause, "Resume")
                    GUICtrlSetState($btn_Skip, $GUI_DISABLE)
                Else
                    $o_speech.Resume ()
                    GUICtrlSetData($btn_Pause, "Pause")
                    GUICtrlSetState($btn_Skip, $GUI_ENABLE)
                EndIf
            Case $msg = $btn_Skip
                $o_speech.Skip ("Sentence", 1)
            Case $msg = $btn_Stop
                $o_speech = ObjCreate("SAPI.SpVoice")
                GUICtrlSetData($btn_Pause, "Pause")
                GUICtrlSetState($btn_Skip, $GUI_DISABLE)
                GUICtrlSetState($btn_Pause, $GUI_DISABLE)
                GUICtrlSetState($btn_Talk, $GUI_ENABLE)
                GUICtrlSetState($btn_Stop, $GUI_DISABLE)
        EndSelect
    WEnd
    Exit
EndFunc   ;==>_Main

Func _Talk(ByRef $o_speech, $s_text, $s_voice = 3)
    Local Const $SVSFlagsAsync = 1
    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, $SVSFlagsAsync)
EndFunc   ;==>_Talk
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

Thought I would throw together a little GUI example

#include <GUIConstants.au3>

Opt("MustDeclareVars", 1)

_Main()

Func _Main()
    Local $GUI, $edit, $btn_Pause, $btn_Skip, $btn_Stop, $btn_Talk, $msg
    Local $o_speech = ObjCreate("SAPI.SpVoice")

    $GUI = GUICreate("SAPI SpVoice", 500, 220, 192, 125)
    $edit = GUICtrlCreateEdit("AutoIt v3 is a freeware BASIC-like scripting language designed for automating the" & @CRLF & _
            "Windows GUI.  It uses a combination of simulated keystrokes, mouse movement and" & @CRLF & _
            "window/control manipulation in order to automate tasks in a way not possible or reliable" & @CRLF & _
            "with other languages (e.g. VBScript and SendKeys).", 10, 10, 480, 100)

    $btn_Talk = GUICtrlCreateButton("Talk", 155, 150, 90, 25)
    $btn_Stop = GUICtrlCreateButton("Stop", 255, 150, 90, 25)
    GUICtrlSetState($btn_Stop, $GUI_DISABLE)
    $btn_Pause = GUICtrlCreateButton("Pause", 155, 180, 90, 25)
    GUICtrlSetState($btn_Pause, $GUI_DISABLE)
    $btn_Skip = GUICtrlCreateButton("Skip", 255, 180, 90, 25)
    GUICtrlSetState($btn_Skip, $GUI_DISABLE)

    GUISetState(@SW_SHOW)

    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $btn_Talk
                _Talk($o_speech, GUICtrlRead($edit))
                GUICtrlSetState($btn_Stop, $GUI_ENABLE)
                GUICtrlSetState($btn_Pause, $GUI_ENABLE)
                GUICtrlSetState($btn_Skip, $GUI_ENABLE)
                GUICtrlSetState($btn_Talk, $GUI_DISABLE)
            Case $msg = $btn_Pause
                If GUICtrlRead($btn_Pause) = "Pause" Then
                    $o_speech.Pause ()
                    GUICtrlSetData($btn_Pause, "Resume")
                    GUICtrlSetState($btn_Skip, $GUI_DISABLE)
                Else
                    $o_speech.Resume ()
                    GUICtrlSetData($btn_Pause, "Pause")
                    GUICtrlSetState($btn_Skip, $GUI_ENABLE)
                EndIf
            Case $msg = $btn_Skip
                $o_speech.Skip ("Sentence", 1)
            Case $msg = $btn_Stop
                $o_speech = ObjCreate("SAPI.SpVoice")
                GUICtrlSetData($btn_Pause, "Pause")
                GUICtrlSetState($btn_Skip, $GUI_DISABLE)
                GUICtrlSetState($btn_Pause, $GUI_DISABLE)
                GUICtrlSetState($btn_Talk, $GUI_ENABLE)
                GUICtrlSetState($btn_Stop, $GUI_DISABLE)
        EndSelect
    WEnd
    Exit
EndFunc   ;==>_Main

Func _Talk(ByRef $o_speech, $s_text, $s_voice = 3)
    Local Const $SVSFlagsAsync = 1
    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, $SVSFlagsAsync)
EndFunc   ;==>_Talk
Thinking of adding some sliders to alter the Piitch, rate and volume.

Could this be done while the voice is speaking or would you have to stop and start it to hear the differnce?

Could be turned into a nice little speech toy! :P

Thanks!


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

Thinking of adding some sliders to alter the Piitch, rate and volume.

Could this be done while the voice is speaking or would you have to stop and start it to hear the differnce?

Could be turned into a nice little speech toy! :P

Thanks!

I think it would have to be stopped because the pitch, volume, ect are tags.

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

I think it would have to be stopped because the pitch, volume, ect are tags.

Ok, I`m rubbish at translating VB...

Can I do something like $o_speech.Pitch = 40 ?

Same for rate and Volume?

Or do I have to insert them into the string as tags?

Thanks.


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

Ok, I`m rubbish at translating VB...

Can I do something like $o_speech.Pitch = 40 ?

Same for rate and Volume?

Or do I have to insert them into the string as tags?

Thanks.

check msdn but i think that it would be either that or something like "<pitch=40>hello</pitch>" or both

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

Is ok, I found this...

#NoTrayIcon
#include <GUIConstants.au3>
Dim $voice = ObjCreate("Sapi.SpVoice")
$Error = ObjEvent("AutoIt.Error", "ErrFunc")
GUICreate("Talker", 600, 280)
$text = GUICtrlCreateInput("Text to speak", 10, 10, 580, 50, $ES_MULTILINE)
$speak = GUICtrlCreateButton("Speak", 10, 65, -1, -1, $BS_DEFPUSHBUTTON)
GUICtrlCreateGroup("Options", 10, 100, 580, 170)
$rate = GUICtrlCreateSlider(20, 150, 280, 30, $TBS_TOP + $TBS_AUTOTICKS)
GUICtrlSetLimit($rate, 50, -50)
GUICtrlSetData($rate, 0)
$volume = GUICtrlCreateSlider(300, 150, 280, 30, $TBS_TOP + $TBS_AUTOTICKS)
GUICtrlSetLimit($volume, 100, 1)
GUICtrlSetData($volume, 100)
GUICtrlCreateLabel("Slow", 20, 185)
GUICtrlCreateLabel("Normal", 140, 185)
GUICtrlCreateLabel("Fast", 270, 185)
GUICtrlCreateLabel("Quiet", 310, 185)
GUICtrlCreateLabel("Loud", 550, 185)
GUICtrlCreateLabel("Voice:", 20, 233)
$voiceC = GUICtrlCreateCombo("Microsoft Sam", 60, 230, 100)
Dim $SOTokens = $voice.GetVoices('', '')
For $Token In $SOTokens
    GUICtrlSetData($voiceC, $Token.GetDescription)
Next
;~ GUICtrlSetData($voiceC, "Microsoft Mike|Microsoft Mary|LH Michael|LH Michelle")
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $speak
            Speak(GUICtrlRead($text), GUICtrlRead($voiceC), GUICtrlRead($rate) / 10, GUICtrlRead($volume))
    EndSwitch
WEnd

Func Speak($text, $SapiVoice, $rate = 1, $Vol = 100)
    $voice.Rate = $rate
    If @error Then Return
    $voice.Volume = $Vol
    If @error Then Return
    Local $t_voice = $voice.GetVoices ("Name=" & $SapiVoice, "Language=409").Item (0)
    If @error Then Return
    $voice.Voice = $t_voice
    If Not @error Then $voice.Speak ($text)
EndFunc ;==>Speak

Func ErrFunc()
    MsgBox(48, "Error", "This machine doesn't have " & GUICtrlRead($voiceC) & " installed")
    SetError(1)
EndFunc ;==>ErrFunc

Just need to add a slider for the pitch. :P


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

lol, that is great though, I didnt even know you could do that.

BTW: Has anyone tried Speech recognition too?

Here's a very very late reply :idea:

I've just created a SAPIListBox UDF that will allow an AutoIT script to respond to a spoken words / phrases from a predefined list of items. Click on this link to access the UDF.


Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia

Share this post


Link to post
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
Sign in to follow this  
Followers 0