Plugin: AGS Text-To-Speech

Started by tzachs, Thu 12/08/2010 21:08:44

Previous topic - Next topic

tzachs

So, I've played around with smiley's new awesome AGS Plugin API for C#
and I made this plugin.


This is simply a small wrapper to Microsoft speech API, which convert text to speech.

The functions available via this plugin are:
Code: ags

//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
- 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.

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...

Kweepa

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...
Still waiting for Purity of the Surf II

Jubei23

This sounds awesome. The links in this forum are dead, unfortunately. Does anyone know whether this plugin is still available?

SMF spam blocked by CleanTalk