Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!lll-lcc!well!espen From: espen@well.UUCP Newsgroups: comp.sys.mac Subject: Re: Sample Macintalk program (Lightspeed C) Message-ID: <2414@well.UUCP> Date: Sat, 17-Jan-87 02:02:17 EST Article-I.D.: well.2414 Posted: Sat Jan 17 02:02:17 1987 Date-Received: Sat, 17-Jan-87 16:12:09 EST References: <1520@utastro.UUCP> Lines: 48 Summary: Aztec C code for Macintalk #include #include #include #include "macintalk.h" int i; char linein[5120],exceptfile[64]; Handle output; SpeechHandle theSpeech; FILE *f,*fopen(); main(argc, argv) int argc; char **argv; { exceptfile[0] = 0; i = SpeechOn(exceptfile, &theSpeech); /*Open the speech driver and the READER English to phonetics conversion package with the default pronounciation ruleset.*/ if (i == 0) { /*If error, go away*/ f = fopen(argv[1],"r"); /*Open the English input file.*/ i = fread(&linein[0],10,512,f); /*Read 10 blocks (5120 chars) from the input file.*/ output = NewHandle(0L); /*Create a handle for the phonetic output. Reader will dynamically grow this handle as needed.*/ /*Convert the English text to phonetic codes.*/ i = Reader(theSpeech, &linein, 6000L, output); i = MacinTalk(theSpeech, output); /*Say it.*/ SpeechOff(theSpeech); /*Close the speech driver.*/ DisposHandle(output); /*Release the output handle*/ close(f); /*Close the input file.*/ } }