Game Development Community

Testers wanted for text to speech (TTS) mod

by James Holmes · in Torque Game Engine · 09/09/2002 (3:22 am) · 16 replies

Hi,
I would really appreciate a few people taking time out to help me test a basic text to speech facility I've written for TGE. I'd like some feedback about installation and other problems before I submit it as a resource. It was developed on a Win2K/VC6 system and should be compatible with the others, but you never know.

It should be easy enough to install, provided you are set up to compile the SDK. TTS makes no changes to the standard TGE files and only one file needs to be compiled and linked with TGE. Linux and Mac users must also compile the speech engine but that is developed on linux and has the necessary make files.

Windows user's please download the zip file at
http://jsent.co.za/tts_win.zip (warning! 2.5MB)
This contains a DLL with the speech engine.

Linux and Mac people please download the zip at
http://jsent.co.za/tts_linmac.zip.
The speech engine is not included in this file and must be downloaded separately, instructions for this are in the tts.html file in the zip.

Both downloads have install instructions in the bundle. Online Systems have kindly provided web space for the files.

So, could you try it out and give me an update? Either send me an email or continue with this thread.

Many thanks,
James

james@eastcape.net

#1
09/09/2002 (11:31 am)
woah, i've been wanting this. I'll try it tonight and get back to ya.
#2
09/09/2002 (12:00 pm)
flite.h is missing from the zip.
#3
09/09/2002 (1:08 pm)
Thanks Neil,

flite.h and friends (60K) can be downloaded from
jsent.co.za/flite_headers.zip

This file is needed for the windows version. Linux and Mac users will get the headers from the flite source download.

James
#4
09/09/2002 (3:57 pm)
I'm getting some linking errors in MSVC++.

I placed the lib file in c:\torque\lib\tts
Then I went into the options dialog and under libraries I entered in the path.

I dumped the .cc and all of the .h's in C:\torque\engine\audio then I added tts.cc and flite.h to the project.

I put the flite.dll in C:\torque\example

When I do a clean build I get this:

--------------------Configuration: Torque Demo - Win32 Release--------------------
Linking...
tts.obj : error LNK2001: unresolved external symbol _register_cmu_us_kal
tts.obj : error LNK2001: unresolved external symbol _flite_init
tts.obj : error LNK2001: unresolved external symbol _delete_utterance
tts.obj : error LNK2001: unresolved external symbol _utt_wave
tts.obj : error LNK2001: unresolved external symbol _flite_synth_text
../example/torqueDemo.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.

torqueDemo.exe - 6 error(s), 0 warning(s)

Any ideas as to what I'm doing wrong?
#5
09/10/2002 (1:00 am)
It seems that flite.lib is not included in the link. All the unresolved externals are from that lib.

Mmm, lets make sure the basics are correct :)

The steps for entering the lib into the options dialog are

1. Select the correct project, eg Torque Demo.
2. Select the correct build 'Release' or 'Debug'.
3. Select the Link tab, then category 'input'.
4. Enter 'flite.lib' at the end of the object/library modules field.
5. Add the path to the directory where 'flite.lib' is held in the 'Additional library path' field. In your case it would *probably* be '../lib/tts' (I separate these paths with a comma.)

I'm sorry this is so pedantic. I often trip over the small things and then have to go back and double check, so in a case like this it worth making sure.

If you still have a problem we can look futher.

James
#6
09/10/2002 (2:39 am)
whats the use of this like? money etc?
#7
09/10/2002 (5:07 am)
"Test guy says the volume is a little low, but it works" (Win2k)

Very cool. I can talk like Dr. Sbaitso or Stephen Hawking hehe.
(Adding the lib fixed the problem)

As for what is the use: Talking characters in a multiplayer game without the need to compress audio to fit on a slow connection.
#8
09/10/2002 (10:01 am)
Hi Edward,

>whats the use of this like?

If you mean 'how do you use it?'
There are about 5 script functions, the main one being
speak(%voice, text);
e.g.
speak(%voice, "hello world");
This would say the words 'hello' 'world' out of the speakers.


If you mean 'I can't see whats the use of this?'
Its another tool that can be used to enhance a game. It is especially useful in situations where the text is not known beforehand, ie it is not possible to record the sentences that must be spoken. Another huge advantage is for downloadable games as recorded speech requires big files whereas the equivalent ascii text is negligable.

> money etc?

If you mean 'what will the software cost?'
I wrote this over a few evenings because I saw that something like this can be useful and as a way to become more familiar with TGE, C/C++ and scripting. I'm going to add it as a resource for anyone to do with as they want, for free. The guts of the software is the speech engine which is the free 'flite' software from Carnegie Mellon.

If you mean 'will testers be paid some money'
Afraid not.
#9
09/10/2002 (10:10 am)
Oh they will be paid... with a really great enhancement! Really great work!
#10
09/10/2002 (10:17 am)
works for me win2k, release_1_1_2
#11
09/11/2002 (10:19 am)
Thanks for the feedback guys.

I'm going to enter it as a resource after this extensive beta test cycle :)

Neil: The default chat volume is set to 0.5 in the example AudioDescription. You could try increasing it up to 1.
#12
09/11/2002 (2:11 pm)
I tried it out and I attemped to do a test via console and look what happends:
==>speak(getVoice("kevin",ChatSpeech), "test");
TTS: no voice available
TTS: invalid voice handle

no voice available? O_o
#13
09/11/2002 (2:13 pm)
Nevermind, I figured it all out :P

by the way, the volume is very very low by default.
#14
09/11/2002 (2:33 pm)
I'll have a look to see why the volume is so low, just give me a day or two.

James
#15
09/11/2002 (3:21 pm)
Nice work on this. Extreme Steve Hawking racing is going to turn out just brilliant with this addition... \=)

As someone noted above, the quick fix for the low volume is to edit the audiodescriptions added to AudioProfiles.cs in fps/client/scripts/ so that the volume is 1.0. Seems to work okay.
#16
09/12/2002 (1:19 pm)
I was worried that there may be a problem with conversion from the linear scale to the log scale used by db. There may still have to be some tweaking but for now please change the default volume to 1.0

You could play around with the referenceDistance and maxDistance parameters for 3d sound, they can make quite a difference as well.