El-Trucha Posted February 26, 2005 Share Posted February 26, 2005 Here's my script: #cs Name: _Talk 1.0 Author: El-Trucha <eltrucha14@gmail.com> Date|Time: 2/25/05 | 10:44 PM Dev Tool: AutoIt v3.1.0 Requirements: WSH 5.6 ENABLED!! Description: This function speaks whatever string you specify in $sText #ce Func _Talk($sText) $tempFile = @TempDir & '\talktemp.vbs' ; Set the temp file FileWriteLine($tempFile, 'Dim Talk' & @CRLF & _ 'Set Talk = WScript.CreateObject("SAPI.SpVoice")' & _ @CRLF & 'Talk.Speak "' & $sText & '"'); Add contents to the temp file RunWait('Wscript.exe talktemp.vbs', @TempDir); Run the VBScript FileDelete($tempFile) EndFunc I made a program that uses this script...I'll upload it 2 www.truchasoft.tk soon!! Hope u like it!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
Holger Posted February 26, 2005 Share Posted February 26, 2005 (edited) :) Extremly funny Small but great....thanks Could maybe used for informing/warning messages like a countdown edit: here is what I mean: #cs Name: _Talk 1.0 Author: El-Trucha <eltrucha14@gmail.com> Date|Time: 2/25/05 | 10:44 PM Dev Tool: AutoIt v3.1.0 Requirements: WSH 5.6 ENABLED!! Description: This function speaks whatever string you specify in $sText #ce For $i = 10 To 0 Step -1 _Talk($i) Sleep(750) Next _Talk("Start the engines") Exit Func _Talk($sText) $tempFile = @TempDir & '\talktemp.vbs' ; Set the temp file FileWriteLine($tempFile, 'Dim Talk' & @CRLF & _ 'Set Talk = WScript.CreateObject("SAPI.SpVoice")' & _ @CRLF & 'Talk.Speak "' & $sText & '"'); Add contents to the temp file RunWait('Wscript.exe talktemp.vbs', @TempDir); Run the VBScript FileDelete($tempFile) EndFunc Thanks a lot EL Edited February 26, 2005 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
Guest Guidosoft Posted February 26, 2005 Share Posted February 26, 2005 _Talk("Hello. This is the computer GOD. I am taking over your computer now.") Link to comment Share on other sites More sharing options...
Insolence Posted February 26, 2005 Share Posted February 26, 2005 HAH! Excellent, this is amazing. Thanks a ton. "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
layer Posted February 27, 2005 Share Posted February 27, 2005 now thats pretty neat! FootbaG Link to comment Share on other sites More sharing options...
Encryption Posted February 27, 2005 Share Posted February 27, 2005 Wow, very nice. This has given me an idea lol. Link to comment Share on other sites More sharing options...
El-Trucha Posted February 27, 2005 Author Share Posted February 27, 2005 Glad y'all liked it! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
buzz44 Posted February 27, 2005 Share Posted February 27, 2005 (edited) lol .. very funny .. is it possible to change it to the female voice ? Edited February 27, 2005 by burrup qq Link to comment Share on other sites More sharing options...
Coffee Posted February 27, 2005 Share Posted February 27, 2005 should be your default voice, female on mine. Link to comment Share on other sites More sharing options...
buzz44 Posted February 27, 2005 Share Posted February 27, 2005 wel its male on mine lol.... on my old comp if u click on speech on control panel i could choose 2 different ones .. female or male .. but i think it mighta been an addon from "XP Plus" qq Link to comment Share on other sites More sharing options...
DirtyBanditos Posted February 27, 2005 Share Posted February 27, 2005 Here's my script:#cs Name: _Talk 1.0 Author: El-Trucha <eltrucha14@gmail.com> Date|Time: 2/25/05 | 10:44 PM Dev Tool: AutoIt v3.1.0 Requirements: WSH 5.6 ENABLED!! Description: This function speaks whatever string you specify in $sText #ce Func _Talk($sText) $tempFile = @TempDir & '\talktemp.vbs' ; Set the temp file FileWriteLine($tempFile, 'Dim Talk' & @CRLF & _ 'Set Talk = WScript.CreateObject("SAPI.SpVoice")' & _ @CRLF & 'Talk.Speak "' & $sText & '"'); Add contents to the temp file RunWait('Wscript.exe talktemp.vbs', @TempDir); Run the VBScript FileDelete($tempFile) EndFuncI made a program that uses this script...I'll upload it 2 www.truchasoft.tk soon!! Hope u like it!! <{POST_SNAPBACK}>huhu El-Trucha funny great job and your SimpleDragonFightin 1.1 is cool Thx dudu Link to comment Share on other sites More sharing options...
Roger Posted March 1, 2005 Share Posted March 1, 2005 (edited) I found some code on the internet that will allow you to change to whatever voice you want. I have the AT&T Natural voices installed, so I will include the code to call for the female voice, crystal16, if you have it. To change the voice, just uncomment the line for the voice you want. If a voice is not installed, you will receive an error. Here goes... ' Declaring variable to hold SAPI object. Dim voic ' Creating SAPI object using spvoice. Set voic = Wscript.CreateObject("SAPI.SpVoice") ' If you want to change the voice then uncomment any of the following 4 lines. 'Set voic.voice = voic.GetVoices("Name=Microsoft mary", "Language=409").Item(0) 'Set voic.voice = voic.GetVoices("Name=Microsoft mike", "Language=409").Item(0) 'Set voic.voice = voic.GetVoices("Name=Microsoft sam", "Language=409").Item(0) 'Set voic.voice = voic.GetVoices("Name=crystal16", "Language=409").Item(0) ' you can set other parameters and properties like voice pitch, speed etc. ' Using speak function of SpVoice to speak a string. voic.Speak("Welcome To My First Speech Enabled ASP Page, Have a nice day!") ' Destroying SAPI.spvoice object. Set voic = nothing Edited March 1, 2005 by Roger Link to comment Share on other sites More sharing options...
jdickens Posted March 2, 2005 Share Posted March 2, 2005 I will put this in our inventory tracking system so the guys in the warehouse don't have to look at the computer screen to verify that they put something in right. I will need a volume control because maybe it will get annoying! Hope it works in W2000... J If I am too verbose, just say so. You don't need to run on and on. Link to comment Share on other sites More sharing options...
pcdestroyer Posted March 3, 2005 Share Posted March 3, 2005 real nice el-trucha i like it a lot lol reminds me of ventrilo lol it's the same voice Link to comment Share on other sites More sharing options...
sir_bob Posted March 3, 2005 Share Posted March 3, 2005 real nice el-trucha i like it a lot lol reminds me of ventrilo lol it's the same voice<{POST_SNAPBACK}>I'm not sure what I am missing here, but I have tried running this script and I get the following errors: Title: Windows Cript HostError: Name Redefined.Code: 800A0411Source: VBScript compilation error.The next error is:Could not laocate automation class named "SAPI.SpVoice"Source: WScript.CreateObject.Can someone give me an idea of what I may be missing.Thanks Link to comment Share on other sites More sharing options...
jdickens Posted March 3, 2005 Share Posted March 3, 2005 Hi Sir_Bob: Which OS are you running? When you go to Control Panel do you have a Speech item? There is a Microsoft dl, which I understand is required for speech recognition, but I do not know if that applies here or not. J If I am too verbose, just say so. You don't need to run on and on. Link to comment Share on other sites More sharing options...
Roger Posted March 3, 2005 Share Posted March 3, 2005 The script only runs on Windows XP. In order for you to run it on Windows 2000 or below, you have to download SDK 5.1 from microsoft and make sure you have the microsoft voices installed and text to speach engine installed. Link to comment Share on other sites More sharing options...
sir_bob Posted March 3, 2005 Share Posted March 3, 2005 Thanks Guys, that would probably be the problem. I tried it on Win2K, I'll give it a run on XP today. Thanks for the replies, Appreciated. Link to comment Share on other sites More sharing options...
Alterego Posted March 3, 2005 Share Posted March 3, 2005 this is neat This dynamic web page is powered by AutoIt 3. Link to comment Share on other sites More sharing options...
Dr Rave Posted March 17, 2005 Share Posted March 17, 2005 Tried it and liked it. Cheers! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now