SRL Archive - Research & Development Lounge

"ReadText" speech plugin


mixster

2008-08-05 12:40:15

This will allow you access to 3 new procedures/functions:
ReadOut(text: string);
ReadOutEx(text, reader: string; rate, vol: Integer);
ReturnVoices: TStringArray;

ReadOut will read out "text" in the default voice.
ReadOutEx will read out "text" with voice "reader" at rate "rate" with a volume of "vol". You do not have to specify "reader" and can just put '' to use default. Normal "rate" is 0 and normal "vol" is 100.
ReturnVoices will return a TStringArray with the names of all the voices available to you. You can then write them out and use the exact text for a reader in ReadOutEx.

This will only work on Windows XP - Wine users will fail as they won't have the Microsoft Speech SDK and Vista users will fail as they have a newer version of Microsoft Speech SDK, but you should be able to get it working if you want when I release the sauce.

This will become Open Sauce when enough people become interested to make me more loved, so get as many people as you can interested.

Lastly, Microsoft Mary is really hot when you get her talking dirty.

Edit:

program VoiceIntro;
var
a: TStringArray;
i: Integer;
begin
a:= ReturnVoices;
for i := 0 to High(a) do
begin
Writeln(a[i]);
ReadOutEx('Hello world', a[i], 0, 100);
end;
end.
That's a good intro script to your available voices
Edit2: Added sauce file - if you're wondering about the size difference, it requires a very heavy included file Activex that it has to compile into the dll with the sauce. If the sauce fails compiling due to one of the uses not existing, you don't have the SAPI it uses - compiled mine with SAPI 5.1, but should work with SAPI 5.2.

R0b0t1

2008-08-05 12:42:55

I love you, mixster! Sauce now plz.

Shady?

2008-08-05 13:20:13

This is great, just think of your pc shouting to your mom 'Hey, we have just advanced a Strength lvl, bitch'
Good job.
Sauce pl0xzor, I wanna see if i can make it run on Vista.

Ransom

2008-08-05 13:42:50

*tears* i was there when it was born…. so lovely. sam hates me tho. mary is my secret lover

Harry

2008-08-05 14:13:39

You should also make into an .exe so you can put it on, let's say, your Pocket PC, and listen to Microsoft Mary talk dirty, even when you are AFK :o

Good work Mixster, s0urce pl0x?

E: I do not have Microsoft Mary installed on my PC or something..? Where can I get her? :(
Successfully compiled (62 ms)
Microsoft Sam
Successfully executed

EvilChicken!

2008-08-05 14:41:45

I thought "Sauce" was a typo :(

That way, it would've been funnier.
But the thing you're doing here is mean.

Saying that you'll give out the sauce once people love you enough. :(
You already know that people love you, don't you?

Anyway, I'm testing this in 37 seconds..

Testing done.
THIS BE FUN! Seriously, now I want to see the source more than everr.

begin
repeat
ReadOut('Lulz, dis be fun.');
until false;
end.

Run et.


Edit:
begin
repeat
ReadOut('So one day, Mary got up and started to choke on the lamb.');
until false;
end.

Edit2: HAHAHHA HARRY, THAT MADE ME LAUGH.
He sounds like he is drowning..

begin
repeat
ReadOut('CAN MIXSTER PLEASE RELEASE THE WRATH OF THE SAUCE');
until false;
end.

Harry

2008-08-05 14:46:50

EvilChicken!: this is funner ;)


begin
repeat
ReadOut('LLLLOOOOOOOOOOOOOOOOOLLLLLLLLLL');
until false;
end.
EEEEEEELLLLLEEELLLLLLLOOOOOHHOHOOOOOOEEELLLLLLLLL

E: Sooooooooy.
And how do I get M$ Mary? :(

mixster

2008-08-05 15:24:20


program Roflcopter;
begin
repeat
ReadOutEx('Soy', 'Microsoft Sam', -5, 100);
until false;
end;

Try that one

Markus

2008-08-05 16:38:29

source pl0x :p

I tried making one of these few months ago, but ofcourse I failed :)
Good job.

Hugolord

2008-08-05 17:15:44

From: Shady?
This is great, just think of your pc shouting to your mom 'Hey, we have just advanced a Strength lvl, bitch'
Good job.
Sauce pl0xzor, I wanna see if i can make it run on Vista.


ROFL
haha lol

but yeah this is awesome ^^

Queso

2008-08-05 17:30:21

'My roflcopter goes soi soi soi soi soi soi soi'

Love that robotic voice. Soi doesn't work on vista voice though :duh:

This would be useful for those nearby their autoing computers. You could have it say 'Procedure Error' or 'Random Error' when necessary to get a scripter's attention! YEH!

mixster

2008-08-05 19:18:08

From: Markus
source pl0x :p

I tried making one of these few months ago, but ofcourse I failed :)
Good job.


ReadOut() is only 5 lines of code - extra credit to Wizzup? though for putting me onto the right track after someone threw me so far off course that it nearly stopped the entire thing with a suggestion to look into narrhook.dll, which didn't help at all :(

Anyway, I think I've been whoring enough love from this and will post up the source when I finish playing on my pc (posting from laptop atm) ;)

Harry

2008-08-05 20:23:07

Yay, source :D

And I still do not know how to get Microsoft Mary :p

mixster

2008-08-05 20:24:39

Not 100%, but updating your .Net framework SDK should add it in.

Timer

2008-08-05 21:35:59

Hahhahah!!!!! Try Thiss!!!!


Begin
Wait(3000);
ReadOut('I can ride my bike with no handlebars');
Wait(10);
ReadOut('No handlebars');
Wait(10);
ReadOut('No handlebars');
Wait(10);

ReadOut('I can ride my bike with no handlebars');
Wait(10);
ReadOut('No handlebars');
Wait(10);
ReadOut('No handlebars');
Wait(10);

ReadOut('Look at me, look at me');
Wait(10);
ReadOut('hands in the air like it''s good to be');
Wait(10);
ReadOut('ALIVE');
Wait(10);
ReadOut('and I''m a famous rapper');
Wait(10);
ReadOut('even when the paths''re all crookedy');
Wait(10);
ReadOut('I can show you how to do-si-do');
Wait(10);
ReadOut('I can show you how to scratch a record');
Wait(10);
ReadOut('I can take apart the remote control');
Wait(10);
ReadOut('And I can almost put it back together');
Wait(10);
ReadOut('I can tie a knot in a cherry stem');
Wait(10);
ReadOut('I can tell you about Leif Ericson');
Wait(10);
ReadOut('I know all the words to "De Colores"');
Wait(10);
ReadOut('And "I''m Proud to be an American"');
Wait(10);
ReadOut('Me and my friend saw a platypus');
Wait(10);
ReadOut('Me and my friend made a comic book');
Wait(10);
ReadOut('And guess how long it took');
Wait(10);
ReadOut('I can do anything that I want cuz, look:');
Wait(10);

ReadOut('I can keep rhythm with no metronome');
Wait(10);
ReadOut('No metronome');
Wait(10);
ReadOut('No metronome');
Wait(10);

ReadOut('I can see your face on the telephone');
Wait(10);
ReadOut('On the telephone');
Wait(10);
ReadOut('On the telephone');
Wait(10);

ReadOut('Look at me');
Wait(10);
ReadOut('Look at me');
Wait(10);
ReadOut('Just called to say that it''s good to be');
Wait(10);
ReadOut('ALIVE');
Wait(10);
ReadOut('In such a small world');
Wait(10);
ReadOut('All curled up with a book to read');
Wait(10);
ReadOut('I can make money open up a thrift store');
Wait(10);
ReadOut('I can make a living off a magazine');
Wait(10);
ReadOut('I can design an engine sixty four');
Wait(10);
ReadOut('Miles to a gallon of gasoline');
Wait(10);
ReadOut('I can make new antibiotics');
Wait(10);
ReadOut('I can make computers survive aquatic conditions');
Wait(10);
ReadOut('I know how to run a business');
Wait(10);
ReadOut('And I can make you wanna buy a product');
Wait(10);
ReadOut('Movers shakers and producers');
Wait(10);
ReadOut('Me and my friends understand the future');
Wait(10);
ReadOut('I see the strings that control the systems');
Wait(10);
ReadOut('I can do anything with no assistance');
Wait(10);
ReadOut('I can lead a nation with a microphone');
Wait(10);
ReadOut('With a microphone');
Wait(10);
ReadOut('With a microphone');
Wait(10);
ReadOut('I can split the atoms of a molecule');
Wait(10);
ReadOut('Of a molecule');
Wait(10);
ReadOut('Of a molecule');
Wait(10);

ReadOut('Look at me');
Wait(10);
ReadOut('Look at me');
Wait(10);
ReadOut('Driving and I won''t stop');
Wait(10);
ReadOut('And it feels so good to be');
Wait(10);
ReadOut('Alive and on top');
Wait(10);
ReadOut('My reach is global');
Wait(10);
ReadOut('My tower secure');
Wait(10);
ReadOut('My cause is noble');
Wait(10);
ReadOut('My power is pure');
Wait(10);
ReadOut('I can hand out a million vaccinations');
Wait(10);
ReadOut('Or let''em all die in exasperation');
Wait(10);
ReadOut('Have''em all healed of their lacerations');
Wait(10);
ReadOut('Have''em all killed by assassination');
Wait(10);
ReadOut('I can make anybody go to prison');
Wait(10);
ReadOut('Just because I don''t like''em and');
Wait(10);
ReadOut('I can do anything with no permission');
Wait(10);
ReadOut('I have it all under my command');
Wait(10);
ReadOut('I can guide a missile by satellite');
Wait(10);
ReadOut('By satellite');
Wait(10);
ReadOut('By satellite');
Wait(10);
ReadOut('and I can hit a target through a telescope');
Wait(10);
ReadOut('Through a telescope');
Wait(10);
ReadOut('Through a telescope');
Wait(10);
ReadOut('and I can end the planet in a holocaust');
Wait(10);
ReadOut('In a holocaust');
Wait(10);
ReadOut('In a holocaust');
Wait(10);
ReadOut('In a holocaust');
Wait(10);
ReadOut('In a holocaust');
Wait(10);
ReadOut('In a holocaust');
Wait(10);

ReadOut('I can ride my bike with no handlebars');
Wait(10);
ReadOut('No handle bars');
Wait(10);
ReadOut('No handlebars');
Wait(10);

ReadOut('I can ride my bike with no handlebars');
Wait(10);
ReadOut('No handlebars');
Wait(10);
ReadOut('No handlebars');
Wait(10);
End.

Negaal

2008-08-05 22:20:31

Haha damn good..would it be possible to get better voice, or attach with another "text to speak" program..cause MS default voices are bit crappy tbh

turbobk

2008-08-06 00:24:10

From: Hy71194
Yay, source :D

And I still do not know how to get Microsoft Mary :p


Microsoft Mary & Microsoft Mike
Microsoft Mike and Mary TTS Engines
Installs these additional SAPI 5 voices onto your computer. For Windows XP only.


@ Mixster

Verry nice!!
I'm gonna use this lol, this should be added to SRL.

So when your autoing and your AFK, if you get attacked by a random, then the voice will say 'FUCK! A random is pwnin us, running away!' or something similar :)

Good work mixster :p

mixster

2008-08-06 07:07:32

@Negaal: I plan on looking into voice packages and more specifically other TTS programs to see if they have API support or have their TTS in a dll so I can call it from there.
@Turbobk: As it's currently only XP, I doubt it would get included, but I would like it to start being used, because it makes sense to have it stay stuff when there's an error, especially with Smart being so popular leading to people autoing while they're on.

I may start working towards to speech recognition with this as well, but it depends on whether or not I can get a mic, otherwise I'll have to hook my audio out into mic and hope it can understand gangster rap or heavy metal.

sparkles

2008-08-06 10:12:30

I just got to say how much I like this. I've just installed Kate's voice and this is so brilliant. I'm off to add this to my scripts.

Thanks.

Dan Cardin

2008-08-09 16:46:58

i was going to do something like this but without the use of a plugin. Which therefore would have been much much less cool, cuz it wouldnt sound like actual speeking.

mixster

2008-08-11 07:11:11

I only used the plugin because you have to use classes and not too sure how to import them into Scar (if even possible), so I decided to just take the easy route and do it through the plugin. My lack of knowledge on importing classes also is what is stopping voice recognition :(