NetStumbler.org Forums

Go Back   NetStumbler.org Forums > NetStumbler Community > Scripts
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 01-25-2003   #1 (permalink)
Deaper
Registered Member
 
Join Date: Nov 2002
Posts: 6
Speech

Ok I'm not going to post my entire script because my script is a combination of several scripts so it'd get confusing. But I will post a little info on this.

Insert this code at the beginning of the script:
Code:
Dim TTSControl
Set TTSControl = CreateObject("Speech.VoiceText")
TTSControl.Register "", nameScript

Function TTS (whattosay)
TTSControl.Speak whattosay, 1
End Function
(This is for VBS scripts only by the way.)

Now in the rest of your code all you need to do to make it talk is put the line
tts "Stuff you want to be annoyed by here"

If you can't get this to work you most likely don't have the Microsoft SAPI installed get that http://activex.microsoft.com/activex...pi/spchapi.exe


This isn't really very useful at the moment for anything but annoying the crap out of you. But when future versions of netstumbler come out hopefully the OnScanResult event will be working and this script will make it possible to give you the name and other attributes whenever a new SSID is found.

I am in no way responsible for insanity caused by annoying computer voices.
Deaper is offline   Reply With Quote
Old 03-15-2003   #2 (permalink)
PRoSPeRe
Registered Member
 
Join Date: Mar 2003
Posts: 2
I tryed your script :

---------------------------------------------------
Dim TTSControl
Set TTSControl = CreateObject("Speech.VoiceText")
TTSControl.Register "", nameScript

Function TTS (whattosay)
TTSControl.Speak whattosay, 1
End Function

Sub OnEnableScan ()
TTS "test"
End Sub

---------------------------------------------------

But I have got an error line 3 char 1 ....
So I have transformed the VBScript in JScript just for the fun

---------------------------------------------------

function OnEnableScan () {
var vt = CreateObject("Speech.VoiceText");
vt.Register("", ScriptName);
vt.Speak("Scan Activated", 1);
while ( vt.IsSpeaking ) Sleep(100);
}

---------------------------------------------------

I've got an another error. However when I try to execute this as a standalone script :

var vt = WScript.CreateObject("Speech.VoiceText");
vt.Register("", WScript.ScriptName);
vt.Speak("Scan Activated", 1);
while ( vt.IsSpeaking ) WScript.Sleep(100);

Everything is OK ...


I think the problem is the register method ...
Somebody can help me please ?

Last edited by PRoSPeRe : 03-16-2003 at 06:59 AM.
PRoSPeRe is offline   Reply With Quote
Old 03-20-2003   #3 (permalink)
lala
Registered Member
 
Join Date: Sep 2002
Posts: 5
[code]var VoiceObj = new ActiveXObject("Sapi.SpVoice");



function OnScanComplete () {
VoiceObj.Speak( BestSNR , 1 );
}


Install the TTS DEV kit
lala is offline   Reply With Quote
Old 06-18-2003   #4 (permalink)
etM
Registered Member
 
etM's Avatar
 
Join Date: Jun 2003
Location: Florida, somewhere near JamLando
Posts: 2
speech

I had an issue as well, but it was with getting the script to actually speak when executed as stand-alone. I put a message box in there to confirm some variables, and - there was the voice. That's how I'm pullin' the voice out of VBScript, with a message box. I haven't investigated the mechanics of it yet , I was just curiouse to try it out. Maybe it has something to do with the sound buffer? Hmm... Here's the code (based on the above):

Dim objTTS
Set objTTS = CreateObject("Speech.VoiceText")
objTTS.Register "", wscript.scriptname
objTTS.Speak "Hello Vee Bee Script World!", 1
msgbox "Hello Vee Bee Script World!", vbInformation + vbOkOnly, "Hello!"

Last edited by etM : 06-18-2003 at 10:35 PM.
etM is offline   Reply With Quote
Old 06-18-2003   #5 (permalink)
etM
Registered Member
 
etM's Avatar
 
Join Date: Jun 2003
Location: Florida, somewhere near JamLando
Posts: 2
speech - code revision!

Turns out the message box extended the execution life of the script. In other words, the speech control will only output while the script is still being executed, so you have to program the script to check the isSpeaking property for false before exiting . Turns out I fixed it myself. It's here for your reference if you happened to have this problem yourself:

sub Shout(theText)
Dim objTTS
Set objTTS = CreateObject("Speech.VoiceText")
objTTS.Register "", wscript.scriptname
' Shout it out.
objTTS.Speak theText, 1
while objTTS.isSpeaking ' And wait patiently for cleaning cycle to end.
wscript.sleep(500)
wend
end sub

thanx to generation5.org for the ideas.
etM is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Google
 
Web NetStumbler.org

All times are GMT -7. The time now is 03:01 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 ©2007, Crawlability, Inc.


All messages express the views of the author and are for entertainment purposes only. Netstumbler.org cannot be held responsible for the authenticity of the content or the actions of its members. By using this site and its services, you warrant that you will not post any messages that are discriminating, obscene, hateful, threatening, or otherwise violates any laws and you release Netstumbler.org from any future claims of any kind whatsoever including, but not limited to, addiction and loss of productivity. All forum messages, private messages and any other content are properties of Netstumbler.org. Even if publicly available, personal or copyrighted information are not to be posted without the consent of the owner. Distribution of licensed and copyrighted materials in any way not endorsed by the copyright owner is strictly prohibited. You may not use this site and its resources to spam other sites or individuals or perform any action that violates any law. Items sold or bought in the For Sale forum are sold as is and no warranty or insurance of any kind is provided. Netstumbler.org cannot be held responsible for the outcome of any transactions and no warranty of any kind is provided, either express or implied. Vulgar words are not allowed in the subject lines ; they may be used in the message body in any forum. The Administrator, Super Moderators and Moderators of Netstumbler.org have the right to remove, edit, move or close any thread for any reason and to reveal your identity and other known information in the event of a complaint or legal action arising from any message posted by you.