Sign in to follow this  
Followers 0
emoyasha

simple text to speech program (and "_speak" function

16 posts in this topic

#1 ·  Posted (edited)

here ya go

$txt = InputBox("text", "text to say")
$TEMPFILE = "TALK.vbs"
FileDelete("talk.bat")
FileDelete($TEMPFILE)
FileWriteLine($TEMPFILE, "Dim Talk")
FileWriteLine($TEMPFILE, 'Set Talk = WScript.CreateObject("SAPI.SpVoice")')
FileWriteLine($TEMPFILE, 'Talk.Speak ' & '"' & $txt & '"')
Sleep(1000)
FileWriteLine("talk.bat", "@ talk.vbs")
Sleep(1000)
Run("talk.bat")
Sleep(3000)
FileDelete("talk.bat")
FileDelete($TEMPFILE)
Edited by emoyasha

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

Share this post


Link to post
Share on other sites



how would i add a gui to thios, im nto farmiliar with how to save gui data to variables i mean i know how to make the controls and associate themt o variables, just not how to submit the data so it becomes the variable


Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

_speak()

func _speak($txt)
$TEMPFILE = "TALK.vbs"
FileDelete("talk.bat")
FileDelete($TEMPFILE)
FileWriteLine($TEMPFILE, "Dim Talk")
FileWriteLine($TEMPFILE, 'Set Talk = WScript.CreateObject("SAPI.SpVoice")')
FileWriteLine($TEMPFILE, 'Talk.Speak ' & '"' & $txt & '"')
Sleep(1000)
FileWriteLine("talk.bat", "@ talk.vbs")
Sleep(1000)
Run("talk.bat")
sleep(200)
WinSetState ( "C:\Windows\system32\cmd.exe", "", @SW_HIDE  )
Sleep(3000)
FileDelete("talk.bat")
FileDelete($TEMPFILE)
endfuncoÝ÷ Ù«­¢+Ø¥¹±ÕÅÕ½ÐíÍÁ¬¹ÔÌÅÕ½Ðì( ÅÕ½Ðíݱ½µÑ¼µäÁɽɴÅÕ½Ðì

i know this might not be very usefull, but it uses much less cpu then dll calls and things of that nature

Edited by emoyasha

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

Share this post


Link to post
Share on other sites

sorry this thing is messing up with weird letters and stuff so i cant edit but ("welcome to my program")

is supposed to be

_speak("welcome to my program")


Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

Share this post


Link to post
Share on other sites

Global $voice = ObjCreate("Sapi.SpVoice")
While 1
$text = InputBox("" , "" , "" , "")
If @error = 1 Then ExitLoop
Speak($text,1,100)
WEnd

Func Speak($text, $Rate, $Volme)
    If IsObj($voice) Then
        $voice.Rate = $Rate
        $voice.Volume = $Volme
        $voice.Speak($text)
    EndIf
EndFunc  ;==>Speak

Better version of NewBe ... now with the posibility to close the script by pressing cancel in the inputbox :D

Share this post


Link to post
Share on other sites

Global $voice = ObjCreate("Sapi.SpVoice")
While 1
$text = InputBox("" , "" , "" , "")
If @error = 1 Then ExitLoop
Speak($text,1,100)
WEnd

Func Speak($text, $Rate, $Volme)
    If IsObj($voice) Then
        $voice.Rate = $Rate
        $voice.Volume = $Volme
        $voice.Speak($text)
    EndIf
EndFunc ;==>Speak

Better version of NewBe ... now with the posibility to close the script by pressing cancel in the inputbox :D

Shorter

Global $voice = ObjCreate("Sapi.SpVoice")
While 1
Speak(InputBox("" , "" , "" , "") ,1,100)
If @error = 1 Then ExitLoop
WEnd

Func Speak($text, $Rate, $Volme)
    If IsObj($voice) Then
        $voice.Rate = $Rate
        $voice.Volume = $Volme
        $voice.Speak($text)
    EndIf
EndFunc  ;==>Speak

I used that when I was bored didn't want to keep running the script.

Share this post


Link to post
Share on other sites

sorry that i was learning jerk


Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

Share this post


Link to post
Share on other sites

lol... weapon got called a jerk :giggle:


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites

Here is an easy way also, but nice script! :D

$Speak = ObjCreate("Sapi.SPVoice")
$Speak.Speak("Hello!!")

To add more lines just $Speak.Speak("Text Here"). :P

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Here is an easy way also, but nice script! :D

$Speak = ObjCreate("Sapi.SPVoice")
$Speak.Speak("Hello!!")

To add more lines just $Speak.Speak("Text Here"). :P

Were you paying attention to any of the posts in this topic?

Edit: Grammatical typo

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

thanks i was going to try to directly do it, but i didnt know that autoit parsed vb commands but yeah this is my first script i pu ton here.


Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

Share this post


Link to post
Share on other sites

We're you paying attention to any of the posts in this topic?

Hippocrite, if you were, you would notice the word also in my post, and mine was simpler.

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Hippocrite

Ad hominem.

if you were, you would notice the word also in my post

I did.

mine was simpler.

Yours was the exact same command as the one that NewBe posted just that NewBe's is more customizable.

My last words concerning this in order to not hi-jack the post.

@emoyasha: Your approach (for not knowing what AutoIt could do) was very well done...

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

I did.

Then there was no need for your post.

Yours was the exact same command as the one that NewBe posted just that NewBe's is more customizable.

Thats the POINT, simpler.

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