Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / DLL: String to speach .... or somthing to speach

Author
Message
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Sep 2003 15:00
is there any chance sombody has a dll or knows how to use the speech dll... (ms sam).

A sort of

Speak "Hello World"
or
Speack "Hello World","Microsoft sam"

Rob... TAtoad..IanM?

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Sep 2003 15:09 Edited at: 5th Sep 2003 15:09
Nick did a speech plugin (http://www.codingarea.com), but you will also need to download the Speech SDK from Microsoft.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 5th Sep 2003 15:35 Edited at: 5th Sep 2003 15:37
K2B2 (sounds like he's related to R2D2) uses it/has used it too.
You may be be able to get away with not needing the Speech SDK if you've got it already installed (especially on XP machines) - worth trying before finding out whether you need it.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Sep 2003 16:22
speech sdk?

dunno what that is or if i have it

i have win xp
which can talk
ms sam mike and mary.
is that ok?

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Sep 2003 16:30
ok...
how the hell do you use that thing

ive downloaded the dba file and contsants but it says cannot find function??!!

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 5th Sep 2003 17:07 Edited at: 5th Sep 2003 17:21
Telling me what function it cant find would be some help.
In addition (as stated on the site), you will need my memory plug-ins as well.
It also provides instructions on where to put the plug-ins.
The good news is you dont need the Microsoft SDK if your using XP.

Oh, and its speech by the way (and constants too).


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Sep 2003 17:21
thanks... all fixed.... OMG THIS IS SOOOOOOO COOL !!!!!!

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 5th Sep 2003 17:32
I know... I did it...


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Sep 2003 18:07
ok a few things to ask


ive limited the code down to this:



there are no help files with this (cus its a beta )

so...

i have 3 voices..

how would i go about finding which is which...

for t=1 to max voicesfound
if t= "Microsoft Sam" then voice = t
next t
set voice t

how would that be written

soz i just ... have a rough idea... ut every time i take the word print out it says could not unerstand command so i dont want to fiddle and mess it all up.

Also is it possible to have it chatting away while other things are being done. i.e. in a 3d scene could you still move around whilst its chatting. or does everything have to stop.

Lets say i want to sort everything out at the start sort the mem out.. establish which voices are which....

then half way through the code i put SAY "hello world"

is there anything else i need after that r each time i say somthing...e.g do i need to clear memory afterwards?

then lets say i make a tidy job of closing the application:

if escapekey()=1 then end

is there anything that has to go before end to make it all nice and tidy e.g. delete memory (ptr) and SpeechDeInit().

It works ... i just want to know what does what thats all.... thanks alot : (hope that made some sense)

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 5th Sep 2003 19:04 Edited at: 5th Sep 2003 19:11
Okay - I'll take these in steps :

Quote: "i have 3 voices..

how would i go about finding which is which"

There is a 'GetVoices' command - Each name is seperated by a '|' (see the example). I might upgrade the command to return strings later (make it a bit easier for you). The IsSpeaking command could do with a bit of a cleanup too...

Quote: "Also is it possible to have it chatting away while other things are being done. i.e. in a 3d scene could you still move around whilst its chatting. or does everything have to stop."

Yes, use SPF_ASYNC to allow a program to continue whilst talking.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Sep 2003 19:54
"SPF_ASYNC"
soz...

i dont understand

that doesnt turn blue :S also cud you show me where abouts that goes in my code

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 5th Sep 2003 20:14
I know... I did it...

Hehe I did too a while back very cool.

I have a machine with xp pro on and it didn't come with directspeech sdk which confused me - it was on my 2000 machine

So I ended up downloading it. So it seems it doesn't come with xp?

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Sep 2003 20:17
oh yeah... it does come with xp... one speech does MS Sam
but you do have to download the other 2

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 5th Sep 2003 22:06
The SPF_ASYNC wont turn blue, as its not a command.
It goes in the second SAY parameter.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Sep 2003 22:32
ptr=make memory(1024)
print "INIT:";SpeechInit()
x=getVoices(ptr,0)
print "Number of Voices:";peekL(ptr,0)
x=getVoices(ptr,1)
print "Total size:";peekL(ptr,0)
x=getVoices(ptr,2)
print "Voices:";peekString$(ptr,0,63,0)
sync
print SetVoice(1)
print say("Hello World",SPF_ASYNC)

print "DeInit:";SpeechDeInit()

delete memory (ptr)


surely that code should go straight through and close. but it doesnt. It starts talks then finishes

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 5th Sep 2003 23:10 Edited at: 5th Sep 2003 23:30
The upgrade to the Speech module will be along later.

The demo code now looks like :



Its now a lot easier to get the number of voices, and the complete list.
There is now also no need to initialise and deinitialise the speech system yourself.

It certainly goes straight through with the update, so when its ready, I'll redo the code and then you can try it. Make sure you've got the constants file in your project too.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Sep 2003 23:19
oh cool

cheeky question but: abomut how long till the update comes out? couple of months? weeks? thx

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 6th Sep 2003 00:02
After I've seen TV, and updated the INI file...


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 6th Sep 2003 01:29
Its now availiable.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 6th Sep 2003 02:28
wow that was quick....

er....

new commands ... or changes that make it easier?

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 6th Sep 2003 02:35
Well, see the example demo code - you will notice that: I've got rid of the memory accessing bits - no longer needed; Dont need my memory plug-in now either; getting the voice names is now much easier, as is the number of voices.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 7th Sep 2003 01:00
Hows the plug-in now ?


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 7th Sep 2003 16:03
Its great ... a bit gitery and broken at points when the SPF_ASYNC is used but then fo what im using it for it doesnt really matter.
other wise its amazing

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 7th Sep 2003 17:16 Edited at: 7th Sep 2003 18:50
SPF_ASYNC takes a lot of processing power - it needs to convert all the text before buffering everything. Dont forget the voices aren't brilliant either.

What sort of machine do you have ?

If you want absolutely no lag, you can write a utility program that uses the speechtowav command to convert the text to a .WAV file, and just use that.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 7th Sep 2003 23:17
oh its not lag (thankfully)

its sort of er... hard to explain... crackling sound

>>TerraByte. Putting the Byte back into Terragramming<< If my post has less than 20 typos then it wasnt me who wrote it!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 8th Sep 2003 01:14
Sounds like you need to update your sound card drivers (or the audio devices used are incorrect).


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester

Login to post a reply

Server time is: 2024-05-04 03:50:02
Your offset time is: 2024-05-04 03:50:02