Computer Chess Club Archives


Search

Terms

Messages

Subject: Speech synthesis

Author: Steven Edwards

Date: 17:26:48 10/22/03


I added speech synthesis to the Macintosh version of my toolkit today.  I had
already installed the code for text generation like:

"White's twenty-third move: The white bishop at square d5 takes the black pawn
at square f7 giving check."

so the now the prgram can announce moves in a somewhat intelligible manner.

The Macintosh code for this is only a few lines:

void CTSysDep::Speak(const char *theStr)
{
#if (CTHostMac)
    if (theStr)
    {
        const unsigned int theLength = strlen(theStr);

        if (theLength < 256)
        {
            char theCVec[256];

            theCVec[0] = (char) theLength;
            strcpy(&theCVec[1], theStr);
            SpeakString((const unsigned char *) theCVec);
        };
    };
#endif
}

Question:  Is there a somewhat standard way of doing the same thing on Linux,
assuming the presence of appropiate hardware audio support?



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.