Log in

No account? Create an account
Sarah's Blog [entries|archive|friends|userinfo]

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Stephen Hawking's Simulator [Apr. 2nd, 2009|10:56 pm]
Did you know you can use the Speech Synthesiser that is installed as part of MS Office in your own programs?

Copy the bit below into notepad, and save it as "speech.vbs", then run it. =D

const svsflagsasync = 1
const svsfpurgebeforespeak = 2

set speech = createobject("sapi.spvoice")

for each v in speech.getvoices
wscript.echo v.getdescription

set speech.voice=speech.getvoices.item(0)
speech.speak "Hi, my name is Stephen Hawkings. I am the Lucasian Professor of Mathematics at the University of Cambridge. I love working there because there's lots of hot babes on campus. Oooo. Oh yeah baby... that's the way.", svsflagsasync + svsfpurgebeforespeak

wscript.sleep 100
'do things here.
loop until speech.waituntildone(10)

[User Picture]From: sarahs_muse
2009-04-08 09:07 pm (UTC)
Oh right!

Just run it on it's own to make the voice file.
This line tells it what to say, change it to store different scentences:

strText = "This script ran on " & Date
(Reply) (Parent) (Thread)