Sign in to follow this  
Followers 0
The713

_TalkOBJ help?

6 posts in this topic

I would simply like to control the speed withint the TalkOBJ function, I tried to mod something thinking, who knows maybe it will work. Here is what I did.

_TalkOBJ("I Hope This Works", 60)

_TalkOBJ("I Hope This Works Again", 40)

Func _TalkOBJ($s_text, $s_speed)

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

$o_speech.Speak($s_text)

$o_speech.Speed($s_speed) ; modded part which doesnt work

$o_speech = ""

EndFunc

Share this post


Link to post
Share on other sites



$o_speech.Speed($s_speed)

is before

$o_speech.Speak($s_text)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

This one works

;Speak("text to speak", 1-10 rate of speaking,
;0 - 100 Colume
$input=InputBox("Text to Speak", "Type Text")
Dim $voice = ObjCreate("Sapi.SpVoice")
Func Speak($Text, $Rate, $Vol) 
$voice.Rate = $Rate
$voice.Volume = $Vol
$voice.Speak($Text)
EndFunc
Speak($input, 1, 100)


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

$o_speech.Speed($s_speed)

is before

$o_speech.Speak($s_text)

8)

Now I keep getting "The requested action with this object has failed." error when I run

Share this post


Link to post
Share on other sites

Now I keep getting "The requested action with this object has failed." error when I run

its "rate"... not speed

i just reversed your line-up, i didn't check your actual code

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Alright, things are working for me now, lol, thanks for the help you two

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