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.

DLL Talk / Xvoice - hwo to make your program speak

Author
Message
Attila
FPSC Reloaded TGC Backer
20
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 8th Feb 2008 21:01
There is a XVoice.dll which allows send a text string and it will be spoken out. It is part of Microsoft TTS-system (Text to Speed).

Did someone ever try to call it from DB and knows how to do it?

In VB6 you can select the speaker (male female) and its language. The you can send a string and the text is spoken out.

I would need a possibility to select the speakers language and voice (it would be strange when all persons in game would speak with the same voice).

Thank you
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 8th Feb 2008 21:24
if its just a wrapper for the MS TTS library, youre not going to have many options of voices/styles to choose from unless its a more robust version fro Vista or something.

either way, if you have the dll, try using load dll commands, but youll need to know the function names and args. If its a plugin for dbp it should be reeady for use as is, or someone might wrap it for you.

[href]mod2software[/href]
Attila
FPSC Reloaded TGC Backer
20
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 8th Feb 2008 21:56
I'll try to write a VB-dll and wrap it with vbAdvance then
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 8th Feb 2008 23:47 Edited at: 8th Feb 2008 23:49
that could work.
I was going to make a .net wrapper for it a while back but decided not to. I may use the dll directly in something I am doing in dgdk.net atm tho. we'll see

[href]mod2software[/href]
Attila
FPSC Reloaded TGC Backer
20
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 9th Feb 2008 22:45
If you get the call dll - commands for xVoice.dll and would share it, I'm interested

Thank you
Greenster
19
Years of Service
User Offline
Joined: 3rd Feb 2005
Location: US ©
Posted: 10th Feb 2008 06:53
AT&T has the best TTS I've ever heard. It actually uses grammar in the speech instead of just vocabulary.

If there ever is a decent TTS we'll see massive story lines in games, and true dynamic commentary. Too bad there isn't such a TTS engine(might be good for robots.)
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 20th Feb 2008 06:43 Edited at: 20th Feb 2008 08:06
This was made using MS Speech API 5.1...If anyone is interested, I am currently working on a 32 bit (non-.NET) plug-in. It is a very nice API, and can read text files in the background(!), and also you can change parameters using embedded XML. (This is an OLD API, too!)

There is a speech recognition and training API in there, too. It is a very complete API. Go to MSDN and download Microsoft SAPI 5.1 SDK if you want to roll your own. (It's got a COM interface, so....)

I will make my work available as always, but...I am going to start asking for donations for this stuff because I have to eat and keep my gear working somehow.

EDIT: btw, the program will not exit until you press ESC...sorry.

Attachments

Login to view attachments
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 20th Feb 2008 17:38
I tried to make a dll with sapi api the code worked fine in c++ but in dpro it was saying all the wrong things ..
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 21st Feb 2008 10:01
Well, you need to make the strings you want spoken into UNICODE strings because that is what the ISpVoice::Speak method expects. The function is called MultiByteToWideChar, or something like that. If you want, I can retrieve the C++ code and post it. Basically, you take in a char* and have a wchar_t buffer to use for the UNICODE version.

Also, there are other plug-ins for SAPI available, and the Enhancements pack apparently has SAPI, as well. I am writing mine to be thinner and also to provide for multiple concurrent voices. Also, I am going to have it be event driven using a message window. Message windows are great to have in DBPro apps because you can use sockets, timers, etc. without creating another visible window. I sometimes set up semaphores in DBPro and set them from the window proc as an alternative to trying to monkey wrench a callback into DBPro.

Login to post a reply

Server time is: 2024-10-18 08:07:30
Your offset time is: 2024-10-18 08:07:30