X Sets the "MODE" with which the speech will be generated. The mode can be either 0 for "Natural" speech or 1 for "Robotic" voice.
X
X* CALL Speech (7,SEX)* ;(reserved for future use by Apple)
X
X* CALL Speech (8,LANGUAGE)* ;(reserved for future use by Apple)
X
X* CALL Speech (9)
X Resets all the Speech parameters to their default values.
X {RATE:150 PITCH:110 MODE:Natural SEX:Male}
X
X* CALL Speech (10,"Text for Translation",Phoneme$)
X This can only be used if English input is in effect. "Text for Translation" is an English string. Phoneme$ is a string variable which will contain the translated phoneme codes upon return.
X
X* CALL Speech (11)
X Provides spoken information about SpeechLib.
X
X
X* These two routines are reserved by Apple for future use within
XMacinTalk. They will not be functional until Apple "fleshes them out"
Xin a future version of MacinTalk.
X
XPhonetic Input:
X The MacinTalk driver produces speech from phonetic codes.
XMacinTalk can translate English input into phonetic codes, but errors in
Xtranslation cause the nuances of speech to become lost. Optimal use of
XMacinTalk for fine tuning of speech is achieved by direct phonetic code
Xinput. To fully understand the direct phonetic input capabilities, the
Xuser should be familiar with the MacinTalk v1.1 manual from Apple
XComputer. This reproduction of the MacinTalk Phoneme Table is included
Xfor quick reference.
X
X
X MACINTALK PHONEME TABLE
X =============================
X VOWELS
X ---------------------------
X IY bEEt IH bIt
X EH bEt AE bAt
X AA hOt AH Under
X AO tAlk UH lOOk
X ER bIRd OH bOrder
X AX About IX solId
X AX and IX should never be used in stressed syllables
X
X DIPHTHONGS
X ---------------------------
X EY mAde AY hIde
X OY bOIl AW pOWer
X OW lOW UW crEW
X
X CONSONANTS
X ---------------------------
X R Red L yeLLow
X W aWay Y Yellow
X M Men N meN
X NX siNG
X S Sail SH ruSH
X F Fed TH THin
X Z haS ZH pleaSure
X V Very DH THen
X CH CHeck J JuDGe
X /H Hole /C loCH
X B But P Put
X D Dog T Toy
X G Guest K Camp
X
X SPECIAL SYMBOLS
X ---------------------------
X DX piTy (tongue flap)
X Q kitt_en (glottal stop)
X RX caR (postvocalic R and L)
X LX caLL
X QX silent vowel
X
X UL = AXL IL = IXL (contractions, see text)
X UM = AXM IM = IXM
X UN = AXN IN = IXN
X
X
X Stress marks
X --------------------------
X Nouns 5
X Pronouns 2
X Verbs 4
X Adjectives 5
X Adverbs 7
X Quantifiers 7
X Exclamations 9
X Articles 0 (no stress)
X Prepositions 0
X Conjunctions 0
X Secondary stress 1, 2
X
X Punctuation
X ---------------------------
X . sentence terminator
X ? sentence terminator
X - phrase delimiter
X , clause delimiter
X ( ) noun phrase delimiters
X
X
XHints for usage:
X
X* The Speech 1 and Speech 3 calls must be paired in order for your
Xprogram to function correctly. Before any speech commands can be
Xissued, Speech 1 must be called and once speech is done, Speech 3 should
Xbe called to remove the code segments from memory.
X
X- If speech is used consistently throughout your program ,the
Xspeech driver should be installed (Speech 1) at the beginning of the
Xprogram and closed (Speech 3) only at the end. (The speech driver must
Xfind an available block of memory each time it is installed. If the
Xheap becomes fragmented between installations of the speech driver, its
Xpossible that loading will fail.)
X
X- If speech is used only in widely separated and selective parts
Xof the program, then Speech 1 and Speech 3 calls should be used locally
Xthose areas. (The speech driver takes up memory and remains resident
Xuntil closed.)
X
X* Both constants and variables can be used as arguments to the speech
Xroutines. This leaves the programming options wide open:
X
X CALL Speech 2, (TextArray(2) + Name$)
X etc...
X
X* SpeechLib is written to accept any numeric size/type (e.g. single or
Xdouble precision) as the input for the speech parameters. The library
Xwill take care of converting the number to an integer for internal use.
X
X* The use of a DEFINT statement has some side effects which must be
Xtaken into account:
X
XIf DEFINT a-z is used at the beginning of the program, you must remember to specify a larger numeric variable type for the library routine name, otherwise the program will crash. (BASIC stores the address of the machine language routine in a variable with the same name as the library routine. An integer variable can't hold a complete 32 bit address so the address is invalid.)
X
X DEFINT A-Z
X Init=1
X Call Speech# (Init)
X
X* English conversion should only be used when the string to be spoken is
Xnot known in advance (e.g. keyboard input). Direct phonetic input
Xshould be used as much as possible to insure maximum listener
Xrecognition.
X
X* In those instances when English input and translation is used, two
Xmethods are available to correct mispronunciation. A MacinTalk
Xexception file can be created with the exception file editor from Apple
Xor the English spelling can be adjusted to more accurately reflect the
Xpronunciation. (e.g. "Willey" becomes "Why lee")
X
X* To aid program readability and ease of programming, I recommend the following opening program assignments:
X
X Init=1: Say=2: Quit=3: Rate=4: Pitch=5:
X Mode=6: Defaults=9: Translate=10: Info=11:
X Natural=0: Robotic=1
X
X* Using these assignments and the implied CALL structure (see the
X"SpeechLib" device.CALL statement in the BASIC manual for more
Xinformation), you can access speech in a very straightforward manner:
X
X LIBRARY "SpeechLib" this opens up SpeechLib for BASIC access
X
X A$="Translate This" a variable assignment for a string
X
X Speech Init,"NewRulz" initialize speech with the exception
X file "NewRulz"
X
X Speech Info pronounces a 'canned' informational
X announcement
X
X Speech Rate,100 sets the speaking rate to 100 words/minute
X
X Speech Pitch,245 sets the speaking pitch to 245 hz.
X
X Speech Mode,Robotic sets the speaking mode to Robotic
X
X Speech Say,"Hello" pronounces the word 'Hello'
X
X Speech Defaults resets all the speech parameters to
X their default values (RATE:150 PITCH:110
X MODE:Natural)
X
X Speech Say,A$ says the English string stored in A$
X
X Speech Translate A$,B$ takes the English string in A$ and
X returns the Phonetic string in B$
X
X Speech Quit closes the speech driver
X
X LIBRARY CLOSE closes the link between BASIC and all
X libraries
X
X
XIf you have any questions, problems or comments, please contact me:
X Kevin J. Willey home phone: (513) 426-2329
X 4453 Stonecastle Dr. #1102
X Dayton, OH 45440
X
X DELPHI : KWILLEY
X GEnie : K.WILLEY
X
X This project would never have been completed were it not for the
Xsupport and direct help of Jim Hopper and the entire Apple-Dayton User's
XGroup in Dayton, Ohio. If you plan on using SpeechLib in a commercial
Xventure please contact me first. If any of you are feeling generous,
Xyou can send me what you think this is worth, a few bucks, a blank disk,
Xsome of your source code, or just a few comments. I promise in return
Xto make every effort to support all worthwhile suggestions which come to
Xmy attention. Future efforts will be directed at the adaptation of the
XSpeechLib interface into the BASIC "virtual device" format. The PRINT#
Xcommand could then be redirected to the
________This_Is_The_END________
if test `wc -l < SpeechLib.doc` -ne 292; then
echo 'shar: SpeechLib.doc was damaged during transit'
echo ' (should have been 292 bytes)'
fi
fi ; : end of overwriting check
echo 'Extracting SpeechLib.asm'
if test -f SpeechLib.asm; then echo 'shar: will not overwrite SpeechLib.asm'; else
sed 's/^X//' << '________This_Is_The_END________' > SpeechLib.asm
X;This is the source code for SpeechLib, a machine language library
X;for accessing MacinTalk from within Microsoft BASIC
X
X;Kevin J. Willey
X
X;15 March 1986
X;Version 3.0a
X
X;Provides access to all of MacinTalk
X;+ Translation function to convert English to Phonemes
X;+ Command to change all parameters back to defaults