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.

Newcomers DBPro Corner / Text To Speech

Author
Message
Somarl
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 27th Oct 2011 00:43
I came across this thread while browsing through the snippets
http://forum.thegamecreators.com/?m=forum_view&t=185360&b=6
It is fantastic. I had a bit of fun with it after i added a way to just take user input and keep looping through that so you didnt have to close the program each time. A fantastic snippet but ultimately relies on google translator and also can only provide 1 voice.

Now i know there are a lot of tts programs out there. I know some of them are quite expensive. I also know that db can write to text files, also it can read in from text files just as something like windows speech can convert speech to text.

So with this two way thing that can go on, is there anyway to mediate it all through dbpro.

This is a bit far fetched so bare with me. Before i even got programming with dbpro i had this idea.
You use a speech to text program to "talk" to dbpro. A function thats written tests how close you are to an npc in your rpg game. Using the old logic from the text based adventures (not easy to program but doable) it first off makes a text file out of what you said using something like the windows speech thing, db pro reads that file. Then filters out what you have said into keywords just like text based adventures do.
"Hello npc, i want to know where i can find Lord Smegface"
Condenses to "where", "lord smegface".
Npc then responds but instead of in words. What it outputs goes into a textfile, something then makes the text to speech program read that file.

Larger possibility for communicating with npcs and such in game without relying on voice actors for every single line of speech, plus it could even say your own name back to you if the game flagged you as being known to them, all you would have to do is to provide your name in text first for all text based instances of your name and a tested phonetic version for whenever it is spoken.
You could get dynamic conversations then based on where someone was exactly and mix up sentences to suit your needs.
"The" + "Golden" + "Orb" + "should be somewhere" + "north" + "of here by my guess"

Another thing would be how to make that tts change the voices and pitch etc but if you could find something with many voices, then change them slightly to suit them better with pitch etc you could instill that personality into each npc easily.
NPC 1 - Voice type Jane, pitch 80
NPC 2 - Voice type Mike, pitch 40
NPC 3 - Voice type Jane, pitch 60
Not quite 3 completely different sounding npcs but a little variation would be better than nothing. You could even do demons perhaps by duplicating the mp3 it created, lowering the pitch even more on one and playing both the sounds together or just slightly offset
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 27th Oct 2011 02:40
Microsoft has a built-in TTS (text to speech engine),, although it seems they don't devote much time/effort to it. The old voice Microsoft Mike, Microsoft Mary, etc... no longer work on Vista and later. It was replaced by Microsoft Anna. Found information on Microsoft Speech API (SAPI) 5.3, though I will have to admit I know very little to nothing about it and I have never tried working with it. But it may be something to look at, and perhaps a DLL could be written to invoke the engine via DB. I found some info about creating new voices, but I'll have to spend some time going over them. Not sure why the technology is there even in Windows 7 yet it seems not much effort/Dev/Support has gone into it.

Here is a MS link to what I could find. I'm not sure if this is the latest API.
http://msdn.microsoft.com/en-us/library/ms723627(v=VS.85).aspx



I may have more time on the weekend to research this a bit more...

Your signature has been erased by a mod please reduce it to 600 x 120.
Somarl
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 27th Oct 2011 13:08
Zen if you could look into this that would be amazing. I truely believe there is potential to write some really cool stuff if this can be incorporated somehow. Dynamic conversations between NPCs gossiping about the latest rumours, better feedback from certain events, better responses. Plus the speech recognition in conjunction would make it easier to converse back with them or issue commands. Look at a door on the target reticule and say "Glanthor open the door" and watch your npc companion walk over and open it.
I have a few more ideas for this as its something i have wanted to do for a very very long time now, i believe once its integrated it would be easy writing dynamic things for everyone to say, or issuing commands, the hard part would be the length of it. It would take a hell of a lot of coding to get a nice abundance of things to say, and reactions based on things said. Thats a lot of variables, flags and general text based statements, but it would be easy, it would just take a lot of time. Time i dont mind spending.

If anyone else reads this as well, please think about how it may be done. I would write something tomorrow to make this work if i could but i dont even know what a dll is so thats me out of the question. And i hate C++, as i simply do not understand it despite buying a £60 book and working my ass off through it.

Zen anything you come up with would be most appreciated, even if its to say that it definately can not be done, so i can at least stop trying to come up with ideas for it
Somarl
13
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 31st Oct 2011 19:59
Did you manage to look into this at the weekend Zen? Or does anyone else have any ideas. Id love to see some of this stuff working. Also i would be willing to put some effort into learning if someone would guide me, as id rather have a big hand in it than just get someone to do it for me. Its just as i mentioned before i cant program in c++ and dont even really know what a dll is or an api so im not sure ill be much use, ive been pointed in directions before and told "read that and do it" and it never works, too much jargon and nothing good for beginners. Would someone like to tutor me while making this work, i can think of some decent ideas for it and it would make a different approach to certain games.

Login to post a reply

Server time is: 2024-11-24 01:13:06
Your offset time is: 2024-11-24 01:13:06