home *** CD-ROM | disk | FTP | other *** search
- /*
- Speech utility - useful for a verbose about╔ box.
- Must have the Macintalk driver on the boot disk for this to run.
- */
-
- #include <speech.h>
- #include <mem.h>
- #include <chat.h>
-
- #define BUFFSIZE 4000L /* arbitrary */
- extern speechhandle thespeech;
-
-
- int chat(string,mode,pitch,rate,chatstat)
- char string[];
- int mode;
- int pitch;
- int rate;
- int chatstat;
- {
- handle output;
- short i;
- long strlength;
- speecherr sperr;
-
- if (chatstat == FIRST_CALL)
- {
- sperr = speechon("",&thespeech);
- }
- strlength = (long) strlen(string);
- speechpitch(thespeech,pitch,mode);
- speechrate(thespeech,rate);
- output = (handle)newhandle(0L);
- sperr = reader(thespeech,string,strlength,output);
- if (strlength < 1)
- return(0);
- sperr = macintalk(thespeech,output);
- disposhandle(output);
- if (chatstat == LAST_CALL)
- {
- sperr = speechoff(thespeech);
- }
- }
-
-