?

Log in

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

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

Stephen Hawking's Simulator [Apr. 2nd, 2009|10:56 pm]
Sarah
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
next

set speech.voice=speech.getvoices.item(0)
speech.rate=2
speech.volume=100
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

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

Comments:
[User Picture]From: sarahs_muse
2009-04-08 09:07 pm (UTC)
May I ask what idea you've had?
(Reply) (Parent) (Thread)
From: ex_sonjaaa
2009-04-08 09:17 pm (UTC)
no I meant i merged the 2 codes you gave me, but now i realize i have to use the second one only to create wav's of voice. you are so smrt thanks for the neat util!
(Reply) (Parent) (Thread)
[User Picture]From: sarahs_muse
2009-04-08 09:25 pm (UTC)
You may find the phoneme feature more interesting:

http://jampal.sourceforge.net/phonemes.html

'''''''''''''''''''''''''''''''''''''''''''''''''

const svsflagsasync = 1
const svsfpurgebeforespeak = 2
const xml = 8

set speech = createobject("sapi.spvoice")


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

set speech.voice=speech.getvoices.item(0)
speech.rate=2
speech.volume=100


speech.speak "<pron sym=""h eh 1 l ow & w er 1 l d""/>", svsflagsasync + svsfpurgebeforespeak + xml


do
wscript.sleep 100
'do things here.
loop until speech.waituntildone(10)
(Reply) (Parent) (Thread)
From: ex_sonjaaa
2009-04-08 09:29 pm (UTC)
Wow, can I create my own phonemes too? Like for a non-English language if I am able to define the vowel formants, etc.?
(Reply) (Parent) (Thread)
[User Picture]From: sarahs_muse
2009-04-08 09:31 pm (UTC)
Um, not from what I can see so far, though it may be possible..

I found this word online: =D

eh 1 k s - t r ax 2 - k ae 1 l - ih 2 - f r ae 1 - jh ax 2 - l ih 1 - s t ih 2 k - eh 1 k s - p iy 2 - ae 1 l - ih 2 - d ow 1 - sh ax 2 s
(Reply) (Parent) (Thread)
From: ex_sonjaaa
2009-04-08 09:51 pm (UTC)
I want to dabble in Festival or other tools some day soon to make text-to-speech Esperanto and Toki Pona...! I'll have to hire you!
(Reply) (Parent) (Thread)
[User Picture]From: sarahs_muse
2009-04-08 09:54 pm (UTC)
Kool!

I'm trying to get the voices added at the bottom of this page:
http://nextup.com/TextAloud/SpeechEngine/voices.html
(Reply) (Parent) (Thread)
[User Picture]From: sarahs_muse
2009-04-08 10:08 pm (UTC)

It's hard finding free language packs.

I've found this so far:
http://www.microsoft.com/downloads/details.aspx?FamilyID=5e86ec97-40a7-453f-b0ee-6583171b4530&displaylang=en


You can run through all your installed voices with this:

'''''''''''''''''''''''''''''''''''


set speech = createobject("sapi.spvoice")

speech.rate=2
speech.volume=100


for each v in speech.getvoices
wscript.echo "This voice is " & v.getdescription
set speech.voice=v
speech.speak "This voice is " & v.getdescription

next
(Reply) (Parent) (Thread)
[User Picture]From: sarahs_muse
2009-04-08 10:18 pm (UTC)
(Reply) (Parent) (Thread)
From: ex_sonjaaa
2009-04-08 10:20 pm (UTC)
Sweet!
(Reply) (Parent) (Thread)
[User Picture]From: sarahs_muse
2009-04-08 09:26 pm (UTC)
(Reply) (Parent) (Thread)