Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!xanth!xanth.cs.odu.edu!wayne From: wayne@cs.odu.edu (C Wayne Huling) Newsgroups: comp.lang.pascal Subject: tspeech.pas from wuarchive.wustl.edu Message-ID: Date: 21 Jun 91 21:49:08 GMT Sender: news@cs.odu.edu (News File Owner) Organization: Old Dominion University, Norfolk, VA Lines: 99 Nntp-Posting-Host: hanuman.cs.odu.edu Sorry for the whole thing, but I think it will help understand my question. Ok, I have made a parent program which includes the following and the needed binary speech.bin. but I don't understand the external definition. It won't compile under turbo pascal 5.5?? any one have any ideas or explanations? or hey! is the author of this code reading and will give a good example of this? { mirrors/msdos/turbopas/tspeech.arc This is the Turbo Pascal include-file for the speech driver. The parameter S must be a character string containing valid phoneme codes: CODE SOUND (capitalized in sample word) ---- ----- A mAke = m-A-k AE bAt = b-AE-t AH cAr = k-AH-r AW dOg = d-AW-g B Bat = B-ae-t CH CHeese = CH-ee-z D Dog = D-aw-g ZH viSion = v-ih-ZH-eh-n - inter-phoneme separator space inter-word pause } type SpeechString = string[255]; procedure Speech(S: SpeechString); external 'SPEECH.BIN'; <---- this is what I don't get??? the compiler wants a semi colon after the word external? Any help would be appreciated. { This procedure speaks the positive integers 1 through 32768. } procedure NumSpeech(N: integer); begin case N of 01: Speech(' wh-uh-n'); 02: Speech(' t-oo'); 03: Speech(' th-r-ee'); 04: Speech(' f-oh-r'); 05: Speech(' f-i-v'); 06: Speech(' s-ih-k-s'); 07: Speech(' s-eh-v-eh-n'); 08: Speech(' a-ee-t'); 09: Speech(' n-i-n'); 10: Speech(' t-eh-n'); 11: Speech(' eh-l-eh-v-eh-n'); 12: Speech(' t-w-eh-l-v'); 13: Speech(' th-ih-r-t-ee-n'); 14: Speech(' f-oh-r-t-ee-n'); 15: Speech(' f-ih-f-t-ee-n'); 16: Speech(' s-ih-k-s-t-ee-n'); 17: Speech(' s-eh-v-eh-n-t-ee-n'); 18: Speech(' a-ee-t-t-ee-n'); 19: Speech(' n-i-n-t-ee-n'); 20..29: begin Speech(' t-w-eh-n-t-ee'); NumSpeech(N - 20); end; 30..39: begin Speech(' th-ih-r-t-ee'); NumSpeech(N - 30); end; 40..49: begin Speech(' f-oh-r-t-ee'); NumSpeech(N - 40); end; 50..59: begin Speech(' f-ih-f-t-ee'); NumSpeech(N - 50); end; 60..69: begin Speech(' s-ih-k-s-t-ee'); NumSpeech(N - 60); end; 70..79: begin Speech(' s-eh-v-eh-n-t-ee'); NumSpeech(N - 70); end; 80..89: begin Speech(' a-ee-t-ee'); NumSpeech(N - 80); end; 90..99: begin Speech(' n-i-n-t-ee'); NumSpeech(N - 90); end; 100..999: begin NumSpeech(N div 100); Speech(' h-uh-n-d-r-eh-d'); NumSpeech(N mod 100); end; 1000..maxint: begin NumSpeech(N div 1000); Speech(' th-aw-u-s-ae-n-d'); NumSpeech(N mod 1000); end; end;