Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: tzachs on Thu 12/08/2010 21:08:44

Title: Plugin: AGS Text-To-Speech
Post by: tzachs on Thu 12/08/2010 21:08:44
So, I've played around with smiley's new awesome AGS Plugin API for C# (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=41465.0)
and I made this plugin.

(http://a.imageshack.us/img441/3214/agstexttospeechscreeny.png)
This is simply a small wrapper to Microsoft speech API, which convert text to speech.

The functions available via this plugin are:

//This function will speak the chosen text, with the selected voice,
//at the chosen speech rate and volume.
//The voice index range is from 0 to the number of voices installed on the computer
// (this can be queried with TTSGetVoicesCount)
bool TTSSpeak(const string text, int voiceIndex, int speechRate, int volume);

//Returns the number of installed voices on the computer
int TTSGetVoicesCount()

//Returns the name of a specific voice index, can be useful
//if you are looking for a specific voice
String TTSGetVoiceName(int voiceIndex)


Requirements:
- Windows
- Dot Net framework installed
- VC++ 2010 redist installed, at http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en (http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en)
- At least one voice installed (XP and above come with at least one default voice, not sure what happens before that)
- That's it as far as I'm aware

Install:
You can download the plugin here (http://www.filefront.com/17195786/AGSTextToSpeechPlugin.zip).

It comes with a demo game, both the plugin + demo have binaries and sources available.

In order to use the plugin in your game, here's what you need to do:
Go to the plugin binaries folder.
Copy the wrapper dll and the plugin dll to the AGS folder.
Copy the speech api dll to your game _Debug and Compiled folders.

You can now use the plugin in your game,

Before distribution, I think that you need to copy the wrapper to the compiled folder as well...
Title: Re: Plugin: AGS Text-To-Speech
Post by: Kweepa on Fri 13/08/2010 00:39:11
Sweet! The demo game worked flawlessly - although all I have is "MS-Anna-1033-20-DSK".
Nice work!
This could come in handy for the next hourgame...
Title: Re: Plugin: AGS Text-To-Speech
Post by: Jubei23 on Wed 20/11/2013 21:20:46
This sounds awesome. The links in this forum are dead, unfortunately. Does anyone know whether this plugin is still available?