********* Welcome to Project 64! http://project64.c64.org The goal of Project 64 is to preserve Commodore 64 related documents in electronic text format that might otherwise cease to exist with the rapid advancement of computer technology and declining interest in 8- bit computers on the part of the general population. If you would like to help by converting C64 related hardcopy documents to electronic texts please contact the manager of Project 64. Extensive efforts were made to preserve the contents of the original document. However, certain portions, such as diagrams, program listings, and indexes may have been either altered or sacrificed due to the limitations of plain vanilla text. Diagrams may have been eliminated where ASCII-art was not feasible. Program listings may be missing display codes where substitutions were not possible. Tables of contents and indexes may have been changed from page number references to section number references. Please accept our apologies for these limitations, alterations, and possible omissions. Document names are limited to the 8.3 file convention of DOS. The first characters of the file name are an abbreviation of the original document name. The version number of the etext follows next. After that a letter may appear to indicate the particular source of the document. Finally, the document is given a .TXT extension. The author(s) of the original document and members of Project 64 make no representations about the accuracy or suitability of this material for any purpose. This etext is provided "as-is". Please refer to the warrantee of the original document, if any, that may included in this etext. No other warrantees, express or implied, are made to you as to the etext or any medium it may be on. Neither the author(s) nor the members of Project 64 will assume liability for damages either from the direct or indirect use of this etext or from the distribution of or modification to this etext. Therefore if you read this document or use the information herein you do so at your own risk. ********* The Project 64 etext of the ComTALKER 64 (Currah Speech) manual Converted to etext by Rodolfo Leal (cpuloyal@uymail.com). ********* - Page (1) - Dear Customer: Enclosed is the ComTALKER 64 text-to-speech synthesizer for your Commodore 64. Also enclosed is the speech synthesis instruction manual. This manual contains the operating instructions for your ComTALKER together with instructions explaining how you can add speech to your existing program. A few sections on speech synthesis theory are included for your reading pleasure. For further information regarding speech synthesis with the use of allophones, "How to Make Your Computer Talk" by Steven J. Veltri (a McGraw Hill publication) can be referenced. The last page of this manual describes the features for the Commodore 64 advanced text-to-speech program. This program has many additional features, as explained, and may be purchased with this unit or at a later date. Please note, however, that the advanced text-to-speech program requires the ComTALKER 64 text-to-speech synthesizer to operate. Yours truly, R.I.S.T. Inc. WARNING This unit must be used in accordance with these instructions. Do not attempt to use this unit with "switchable" Motherboards etc. which selectively cut off the power supplies to the slots. NEVER INSERT OR REMOVE THIS UNIT WHILE THE POWER TO THE COMPUTER is ON. Failure to follow these instructions may result in permanent damage to the speech unit or the computer. (c) 1984 R.I.S.T. Inc. Brooklyn, NY 11209 - Page (2) - TABLE OF CONTENTS Page CHAPTER ONE: Setting Up the ComTALKER 64 . . . . . . . 3 CHAPTER TWO: Simple Words and Phrases . . . . . . . 4 CHAPTER THREE: Using the Allophones Directly . . . . . . . 5 CHAPTER FOUR: Using Both Voices and Intonation . . . . . . 13 CHAPTER FIVE: The Speech Buffer . . . . . . 14 CHAPTER SIX: Using Machine Code with the Unit . . . . . . 15 CHAPTER SEVEN: Text-to-Speech Techniques . . . . . . 18 APPENDIX I: The Speaking Clock . . . . . . 20 APPENDIX II: Reference Basic Commands . . . . . . 21 - Page (3) - CHAPTER ONE: Setting Up the ComTALKER 64 The R.I.S.T. ComTALKER 64 is an allophone speech synthesizer, which means that it uses individual speech sounds strung together to make intelligible speech. Unlike some speech synthesizers which have a fixed vocabulary, the ComTALKER 64 has an unlimited vocabulary and can synthesize any word or sentence in the English language. ComTALKER 64 incorporates a text-to-speech conversion system which will convert most English text into speech automatically. Note: For a more detailed explanation see Chapter Seven. Furthermore, the user can access the allophones directly for difficult words and the unit features both a high and a low voice, each with programmable intonation. To set up the unit, remove it from its wrapping tray if you have not already done so, SWITCH off THE CBM64, and plug the unit into the CARTRIDGE EXPANSION PORT at the back of the computer, RIST logo uppermost. Now take the DIN plug which comes from the ComTALKER 64 unit and plug it into the AUDIO/VIDEO SOCKET at the back of the CBM64 -- this is the DIN socket which is nearest to the expansion port -- you can't get the DIN plug into the wrong socket as they are physically different. This lead allows the speech generated by the ComTALKER 64 to be fed into the computer's sound circuitry and come from the TV speaker. Switch on the CMB64. The computer will initialize normally. Turning the volume control on your TV set to the right or left will increase or decrease the volume of the synthesizer. Then type: 10 INIT (and RETURN) RUN (and RETURN) ComTALKER 64 will now "voice" any key pressed on the keyboard. For instance, if you press RETURN the unit will say "return". Try pressing some more keys. Note that all graphic characters are voiced as "graphic", whatever their shape. If you type very fast then you will find that ComTALKER 64 always tries to speak the latest key depression. ComTALKER 64 will always voice the keys with the high voice after being INITialized, however, if you wish to use the low voice then type: KON 0 (and RETURN) ComTALKER 64 will now voice any key pressed on the keyboard with the low voice. If you wish to use the high voice again then type: KON 1 (and RETURN) or just KON (and RETURN) Apart from being useful in themselves, the keyvoices serve to illustrate what can be achieved by allophone speech synthesis. Before going on to the next section, you may wish to turn off the keyvoices again. This time, try putting KOFF inside a simple program, like this: 10 KOFF When you RUN this, the keyvoices will be disabled again. Both KON and KOFF can be used in a Basic Program line. - Page (4) - CHAPTER TWO: Simple Words and Phrases ComTALKER 64 contains a text-to-speech interpreter -- the unit's internal software scans inputted text and converts it automatically to the speech sounds required. Simply type in SAY followed by the words you want spoken, enclosed in quotation marks, like this (you can use upper or lower case letters): SAY "HELLO" When you press ENTER, the unit will say "hello". Now type in: SAY "HELLO, MY NAME IS COMTALKER SIXTY FOUR" and the unit will say what you have enclosed in the quotation marks. You can use the SAY command just like the KON and KOFF commands -- try this short program: 10 SAY "THIS IS A BASIC PROGRAM" Note carefully what happens when you RUN it. Did you see how the program finished before the speech stopped" The speech allophones are "queued" before output in a "interrupt-driven buffer" -- this is some jargon which basically means that your Basic program is not slowed down when it la outputting speech, and can in fact be "finished" while the voice continues to say what it has been told to say. Try entering some sentences of your own now. Note that punctuation marks (commas, apostrophes, colons, periods, etc.) are all interpreted as pauses of various length but where a period occurs before a digit (e.g., 3.4) it is spoken as "point". The mathematical symbols +, -, / and * are pronounced as "plus", "minus", "divide by" and "multiply" respectively. The buffer can hold up to 256 allophones -- or approximately 30 seconds of speech -- at any moment, and if ComTALKER 64 finds that there is no room for a new word or phrase to be added, the phrase will be ignored. You can get around this by using a delay loop in your program or by examining the buffer (See Chapter Five). If you break into a program while it is running, any speech in progress is stopped and the buffer la automatically emptied. This is to ensure that you will not have to wait for the buffer to empty itself --30 seconds of unwanted speech can be quite tedious! - Page (5) - CHAPTER THREE: Using the Allophones Directly Turning text into speech is quite a difficult procedure as there are many spelling pronunciation irregularities. For instance, "plough" and "cough" are spelled similarly but the "ough" component is spoken differently. ComTALKER 64 uses a rule-oriented system which can cope with most common spelling- pronunciation irregularities. There are some words which it cannot cope with as they do not obey any logical rules. You will probably quickly find words that ComTALKER 64 will pronounce wrong, depending on how determined you are to defeat it, but do not worry as it is very easy to get ComTALKER 64 to say even the most illogically-pronounced words. Suppose you wanted to make the unit say "Hawaii". If you typed in SAY "HAWAII" then ComTALKER 64 would respond with a word that would sound rather like "Haway-i". You could try deliberately misspelling the word, like this: SAY "HAWHY'EE" And this will work very well, but there is another way. All the speech in ComTALKER 64 is generated using allophones. The text-to-speech routines convert text into the relevant allophones or output, but you can instruct the unit to say allophones directly. There are 58 speech sounds to choose from and four pauses of variable length, and you make words by stringing together the allophone symbols (the "mnemonics" for the allophones) inside a SAY command. There are some points to note. First, some of the mnemonics are single letters and some are several letters enclosed In ROUND BRACKETS (see table below). Second, the SAY command must be informed that you are using allophones directly and you do this by enclosing the string of mnemonics (allophones) Inside SQUARE BRACKETS. Suppose you wanted to make a single "ai" sound (as in the "ai" in "Hawaii"). The allophone mnemonic for this sound (sea table below) is (ii). To make ComTALKER 64 say this sound, simply use the SAY command again, but enclose the allophone mnemonic you require inside SQUARE BRACKETS, like this: SAY "[(ii)]" The unit will say "eye". Try this: SAY "[haw(ii)(ee)]" The unit will say "Hawaii". From the table given below, you can make up any word in the English language. The first column of Table 3-1 represents the allophone names (symbols) which will be typed into your computer to generate that particular sound. The second column gives sample words and shows how the allophone sounds are used in context. Here you can understand the actual sound the symbol represents. The third and fourth columns list the allophones decimal and hex locations in memory. For some phonemes there are two allophones to account for the initial and final position. In final position, stop consonantsb - Page (6) - are usually unreleased. For example, when pronouncing words such as rib, played and peg, the final stop consonants (b, d, g) are shortened or not fully pronounced (unreleased) because they are not followed by other phonemes. For this reason, when using a stop consonant in the final position of a word, an allophone with a shorter duration is required. As a result, an allophone designed for an initial position may sound too bud or strong in the final position and vice-versa. Notice that the initial version of some allophones are longer than the final version (e.g., d, (dd), see Table 3-1). The allophones marked with a single asterisk (*) can be doubled or tripled. This means that these allophones may be joined together in succession. This feature is only incorporated in selected allophones. Therefore, to create an Initial "s" you can use "s,s" as opposed to one "s" at the and of a word. This can also be accomplished with the "th", "f", and the short vowels. Other phonemes may appear as three different allophones. These allophones are also used for different vowel contexts. Studies have shown that stressed syllables are higher in amplitude and pitch and longer in duration than unstressed. Duration is the more prominent cue to stress, when compared with amplitude. Due to this fact, a syllable will sound stressed if its vowel is lengthened. For this reason, it is useful to double short vowels when stress of a particular sound is required. For example, in the word "is" (i-z), you may want to double the "i" allophone for increased stress, 1 - 1 - z. You can also create differences between words like the noun "subject" , which is stressed on the first syllable, and the verb "subject" which is stressed on the second syllable. This can be accomplished by using two "u"s in the first syllable of the noun and two "e"s in the second syllable of the verb. For Example: Noun - subject s-s-u-u-'-b-'-j-e-'-ck-'-(tt) Verb - subject s-s-u-'-b-'-j-e-e-'-ck-'-(tt) Long vowels cannot be doubled but the "ou" allophone appears with two durations. The short one, "ou" sounds good in words with many syllables after "y", as in "computer". The long version, "ouu", is used in monosyllabic words as in two and food. The column labeled R-Colored vowels contains allophones created from the vowel sound plus "R". The "(er)" in particular contains two versions. The short one "(er)" is useful in words that and in "er" (letter, better). The long one, "(err)" is useful for monosyllabic words (fur, bird). Several phonemes have allophones that were specifically designed to concatenate or join together with other phonemes. For example, "t" was designed to be used in final clusters before "s", as in "its" or "tests". Because of the coarticulatory effects of vowels on some consonants, different allophone consonants are required depending on the vowel context. g is needed before allophone such as (ea), (ear), i, or e, as in guest. (nn) is needed before allophones such as (uh), (oy), (or), or (oo) as in no. - Page (7) - A Word on Pauses Some sounds, labeled as voiced stops, voiceless stops and affricates in Table 3-1, require a brief duration of silence before them. It has been shown that shortening the silent duration before a voiceless stop results in the perception of a voiced stop and the converse and holds true. Therefore, voiceless stops require a longer duration of silence or pause before them than voiced stops. So a "'" may be used before b, d, g and j while a "," be used before p, t, k and (ch). This will cause the following allophone to appear to be stressed somewhat. The allophones that require pauses before them appear in Table 3-1 and are denoted by a (+). You may need to change the duration of the pause a few times to make it correct, but don't get discouraged, because it will soon become an automatic process to you! Take a look at the following sample words. This will give you an insight into allophone synthesis. Here are some examples of words made using allophones: he(ll)(oo) hello (gg)(ou)(dd)b(ii) goodbye welkum welcome m(or)ni(ng) morning aft(er)n(ouu)n afternoon (ee)vni(ng) evening in(gg)lund England y(ouu)n(ii)(tt)id st(aa)ts United States sp(ea)(ch) sin(th)us(ii)z(er) speech synthesizer penisilin penicilin ny(ou)kl(ear) nuclear (oy)l oil electrisit(ee) electricity kum'py(ou)'(tt)(er)z computers wii(sh) wish To create the word "computers", think of how it sounds, not the way it's spelled. Using Table 3-1, pick out the first sound, which is the "k" allophone. "k" was chosen because the next sound, when spoken slowly, sounds like the "a" sound in lapel. The allophone used to represent this sound is "u" and "k" is used before "u". The following sound is an /m/ sound. We will use the "m" allophone. Now we have "k-u-m" which represents the "com" in computers. Next we must find a /p/ sound. Look under voiceless stops, and you will find a "pp" sound as in trip. Because it is best to use a pause before voiceless stops, try adding a "'" before "p". The following sound is a little tricky. One may think the next sound is a /u/ sound. Well that's only half correct. If you look under resonants, you will find a "y" sound and a "(yy)" sound. Since the "y" sound is used in clusters as in "cute" and "beauty", this becomes the next allophone, because the word computer contains the cluster "pute". Now to continue the cluster we need the /u/ sound. You will find two choices under the long vowels. Notice UW1 is used after clusters with y. Now, to continue the word we need a /t/ and /er/ sound. First insert another "'"; remember pause before a voiceless Stop. Here, we have two possibilities, "t" or "(tt)". Because the /t/ sound is not in a cluster with "a", the "(tt)" allophone will be used. The next sound is a vowel sound followed by an /r/ sound. Remember there were special allophones designed for specific use in this case. They are called the R-Colored vowels. Here we have two choices, once again. "Computers" is - Page (8) - surely not a monosyllabic word, so the only choice left is "(er)". The next sound is also a little tricky. Once again think of how the word sounds not the way its spelled. If you try an "s" sound, you will notice this is incorrect. What the sound really is, is a /z/ sound. So let's end the word with the allophone /z/. The final word should look like this: k-u-m-'-p-y-(ou)-'-(tt)-(er)-z Now let's try to create the word "wish". Here one may get confused with the "w" sound or the "(wh)" sound. The correct sound is the "w" sound. To fully explain why this is true would take a lengthy explanation. The position of the lips, and air being expelled, are two major reasons. For this situation it would be easier to try both of them. Whichever one sounds better to you is the one to use. The next sound is the short /i/ sound an in "sit". Under the short vowels there is an "i" allophone. These short vowels are unique in that they can be stressed. This particular word requires a little stress, so double the "i" allophone. (To hear the differences, try it both ways.) The final sound is the /sh/ sound as in ship. Under voiceless fricatives, you will notice the "(sh)" allophone. The completed word is: w-i-i-(sh) When constructing words from allophones, always remember, to think about how a word sounds, not how it is spelled. Although in some cases it may be obvious, in other cases it may not. It's obvious that an "(ng)" allophone belongs at the end of the words "song" and "long". It is not so obvious that it is used to represent the /n/ sound in "uncle". Furthermore, as you have already noticed, some sounds may not even be represented in words by any letters, like the "y" in computers. Please note that these are only suggestions, not rules. You may want to play with different sounds or different pauses to create a sound that is pleasing to your ear. (Don't be surprised if your synthesizer has your regional accent!) Speech synthesis is so subjective that what one person likes, another may not. Because allophone synthesis given the user the ability to change sounds at will, it provides a rich environment for experimentation. So, go ahead and change a few sounds, the intent of this book is to teach you the fundamentals and basic concepts of allophone synthesis. TABLE 3-1 ALLOPHONE GUIDELINES ALLOPHONE SAMPLE WORDS DECIMAL HEX Silence ' (apostrophe) - before b, d, g, and j 1 01 (space) - between clauses and sentences 3 03 , (comma) - between clauses and sentences 4 04 . (period) - end of sentences This is a hybrid of two comas. - Page (9) - ALLOPHONE SAMPLE WORDS DECIMAL HEX Short Vowels *i - s_i_tt_i_ng, strand_e_d 12 0C *e - _e_xt_e_nt, g_e_ntlem_e_n _e_nd 7 07 *(eh) - extr_a_ct, _a_cting, h_a_t 26 1A *(uh) - c_oo_kie, f_u_ll, b_oo_k 30 1E *o - t_a_lking, s_o_ng, _ou_ght 23 17 *u - l_a_pel, instr_u_ct, s_u_cceed 15 0F *a - p_o_ttery, c_o_tton, h_o_t 24 18 Long Vowels (ee) - tr_ea_t, p_eo_ple, penn_y_, s_ee_ 19 13 (aa)/(ay) - gr_ea_t, st_a_tement, tr_ay_, b_ei_ge 20 14 (ii) - k_i_te, sk_y_, m_i_ghty 6 06 (oy) - n_oi_se, t_oy_, v_oi_ce, b_oy_ 5 05 (ou) - after clusters with YY: com_pu_ter 22 16 (ouu) - in monosyllabic words: t_wo_, f_oo_d 31 1F (oo)/(eau) - z_o_ne, cl_o_se, sn_ow_ 53 35 (ow) - s_ou_nd, m_ou_se, d_ow_n 32 20 (ll) - litt_le_, ang_le_, gent_le_men 62 3E R-Colored Vowels (er) - lett_er_, furnit_ure_, int_er_rupt 51 33 (err) - monosyllables: b_i_rd, f_er_n, b_ur_n 52 34 (or) - f_or_tune, ad_or_n, st_or_e 58 3A (ar) - f_ar_m, al_ar_m, g_ar_ment 59 3B (ear) - h_ear_, _ear_ring, _ir_responsible 60 3C (aer) - h_air_, decl_are_, st_are_ 47 2F - Page (10) - ALLOPHONE SAMPLE WORDS DECIMAL HEX Resonants (w) - _w_e, _w_arrant, lin_gu_ist 46 2E (rr) - initial position: _r_ead, _wr_ite, x-_r_ay 14 0E r - initial cluster: b_r_own, c_r_ane, g_r_ease 39 27 l - _l_ike, he_ll_o, stee_l_ 45 2D y - clusters: c_u_te, b_eau_ty, comp_u_ter 49 31 (yy) - initial position: _y_es, _y_arn, _y_o-_y_o 25 19 Voiced Fricatives v - _v_est, pro_v_e, e_v_en 35 23 (dth) - word-initial position: _th_is, _th_en, _th_ey 18 12 z - _z_oo, pha_s_e 43 2B (zh) - bei_ge_, plea_s_ure 38 26 Voiceless Fricatives *f - _F_ood 40 28 *(th) - _Th_in 29 1D *s - _s_it 55 37 (sh) - _sh_irt, lea_sh_, na_ti_on 37 25 h - before front vowels: (ear), (ee), i, (aa), e, (aer), (eh) - _h_e, _h_en, _h_it, _h_ear, _h_eat, _h_ay, _h_air 27 1B (hh) - before back vowels: (ou), (uh), (oo), (ou), (or), (ar), - _h_ue, _h_ook, _h_oe, _h_oist, _h_awk 57 39 (wh) - _wh_ite, _wh_im, t_w_enty 48 30 +Voiced Stops b - final position: ri_b_ between vowels: fi_bb_er _b_leed, _b_rown 28 lC (bb) - initial position before a vowel; _b_east 63 3F - Page (11) - ALLOPHONE SAMPLE WORDS DECIMAL HEX d - final position: playe_d_, en_d_ 21 15 (dd) - initial position: _d_own; clusters: _d_rain 33 21 g - before high front vowels: (ear), (ee) , i, (aa), e, (aer): _g_uest 36 24 (gg) - before high back vowels: (ou), (uh), (oo), (oy) ,u: and cluster: _g_reen, _g_lue 61 3D (ggg) - before low vowels: (eh) , (ow), (ii), (ar), a, o, (or), (er); and medial clusters: a_ng_er: and, final position: pe_g_ 34 22 +Voiceless Stops p - _p_leasure, am_p_le, tri_p_ 9 09 t - final clusters before SS: tes_t_s, i_t_s 17 11 (tt) - all other positions: _t_es_t_, s_t_ree_t_ 13 0D k - before front vowels: (ear), (ee), i, (aa), e, (aer) ,(ii), (eh), (er), u 42 2A initial clusters: cute _c_lown, s_c_ream (ck) - final position: spea_k_; final clusters: tas_k_ 41 29 c - before back vowels: (ou), (uh), (oo), (oy), (or), (ar), o; initial clusters; _c_rane, _qu_ick, _c_lown, s_c_ream 8 08 (ch) - _ch_ur_ch_, fea_tu_re 50 32 j - _j_udge, in_j_ure 10 0A m - _m_ilk, alar_m_, a_m_ple 16 10 n - before front and central vowels: (ear), (ee), i, (aa), e, (aer), (eh), (er), u, (ow), (ii), (ou) final clusters: ear_n_ 11 0B - Page (12) - ALLOPHONE SAMPLE WORDS DECIMAL HEX (nn) - before back vowels: (uh), (oo), (oy), (or), (ar), a: _n_o 56 38 (ng) - stri_ng_, a_ng_er, a_n_chor 44 2C *These allophones may be doubled for initial position and used singly in final position. +Require a pause before allophone. NOTE: Underlined (_underscored_) letters indicate allophone sound. Three allophones are not implemented in the interpreter, they are: ALLOPHONE SAMPLE DECIMAL HEX Pause 0 l0 ms 0 00 Pause 2 50 ms 2 02 (dth2) bathe 54 36 You may use these in your machine code programs. Some more examples of the use of allophones can be found in Appendix I. Remember when using allophones that you have to think how words are spoken, rather than how they are written. It often helps to slowly speak the word you wish to pronounce, breaking it down into the individual speech sounds. Try making up some words now using allophones and compare your efforts with those of ComTALKER 64' text-to-speech routines. Note that if you make a syntax error (i.e., use an allophone that doesn't exist) the allophones will be ignored and the message: ? SYNTAX ERROR or ? SYNTAX ERROR IN XXX will be displayed, where XXX is the line number where the error occurred. ComTALKER 64 will, however, speak up to where the error occurred. The really interesting thing about using allophones is that you can mix up normal text with allophones in a single SAY command, like this: SAY "I come from [haw(ii)(ee)]" Note also that the SAY command can be assigned a string variable or an element of a string array (see Appendix II for examples of this). - Page (13) - CHAPTER FOUR: Using Both Voices and Intonation So far you have just been using one voice to output speech. The SAY command uses Voice 1 (the higher one) by default, but you can use the lower voice by using SAY 0, like this: SAY 0 "MY VOICE IS DEEPER" Say 1 uses Voice 1, but as stated above the SAY command defaults to Voice 1 anyway, so you will hardly ever need this. You can use both voices in a program, like this: 10 SAY "VOICE 1" 20 SAY 0 "VOICE 0" Each voice has programmable intonation on the individual allophones. Intonation is helpful in allophonic speech as it adds expression and "life" to what is otherwise rather robotic speech. Due to the complexity of the text-to-speech routines, you can only use intonation when you are using the allophones directly. You access intonation by using upper and lower case letters for the mnemonics -- upper case is intoned UP, while lower case is not intoned. Try this to see what intonation sounds like. SAY "[aaAAaaAAaaAA]" and SAY "[(hE(ll)(OO)]" And also: SAY "[aaAAaaAAaaAA]" and SAY "[(gg)(OU)(dd)b(ll))" You can see intonation being used in the example program in Appendix II. Remember that intonation will be most effective on vowels but you should try by experimenting with it to see what effects you can get. An interesting effect is to use intonation and the two vowels to get four different monotonic voices, like this: 10 SAY 0 "[he(ll)(oo)]" 20 SAY 0 "[HE(LL)(OO)]" 30 SAY 1 "[he(ll)(oo)]" 40 SAY 1 "[HE(LL)(OO)]" - Page (14) - CHAPTER FIVE: The Speech Buffer As explained earlier, the speech buffer can hold 256 allophones or about 30 seconds of speech. Normally this will not bother you, but if you wish to say a long sentence you may find that you can fill up the buffer faster than it can empty. The buffer can only empty as fast as ComTALKER 64 can speak the words, but Basic can fill up the buffer in a few milliseconds. So what do you do if you have a long sentence -- say one which when interpreted will generate more than 256 allophones? To help you, ComTALKER 64 maintains a Basic variable, SP%, which informs you how much space there is left in the buffer at any time. Try this program to see how the buffer fills up: 10 SAY "HELLO" 20 PRINT " " (shifted HOME) 30 PRINT SP% 40 IF SP%<4 THEN 40 50 GOTO 10 RUNning this program will show the decreasing amount of space left in the buffer as line 10 fills it up with "hello's". Line 40 is a wait loop for the buffer to empty if there is no room at ah. Remember that if ComTALKER 64 cannot fit all the allophones in for a particular word, it will put in what it can and lose the rest. So if you find your sentences are being "clipped" then simply insert a suitable wait loop for the buffer to empty, like this: 100 IF SP%12 THEN H=H-12 310 IF H=0 TREN H=12 320 X=H: GOSUB 1000 330 IF M>0 THEN 360 340 SAY "0'CLOCK" 350 GOTO 370 360 X=M: GOSUB 1000 370 IF S>0 THEN 400 380 SAY"[pr(ee)s(ii)sl(ee)]" 390 GOTO 440 400 SAY"AND" 410 X=S: GOSUB 1000 420 SAY"[secund]" 430 IF S>0 THEN SAY "[S]" 440 FOR A=0 TO 5000:NEXT 450 GOTO 260 1000 IF X-50>=0 THEN X=X-50: A$=T$(23):GOTO 1060 1010 IF X-40>=0 TREN X=X-40: A$=T$(22):GOTO 1060 1020 IF X-30>=O TREN X=X-30: A$=T$(21):GOTO 1060 1030 IF X-20>=0 TREN X=X-20: A$=T$(20):GOTO 1060 1040 SAY T$(X) 1050 RETURN 1060 SAY A$ 1070 IF X=0 TREN RETURN 1080 GOTO 1040 - Page (21) - APPENDIX II - A Description of the Extra Basic Commands for Reference Purposes SAY Format: SAY n (user string) SAY n (string variable) SAY n (element of string array) Where n is eithar 0 or 1. If n is not specified, it defaults to 1. Restrictions: User string must be enclosed in quotation marks. String concatenation is not allowed; the input string must be a single string, element of a string array, or string variable. Examples of valid use of SAY command: SAY "hello" SAY 0 A$ SAY 0 V$(1,3) SAY 0 R$(2,3,6) INIT Format: 10 INIT, RUN Initilizes ComTALKER 64 operating system. BYE Format: BYE Temporarily suspends ComTALKER 64 operating system. No messages issued. Basic runs as normal and the Extended Basic commands will be processed as errors, until INIT is again invoked. KON Format: KON n Where n is either 0 or 1. If n is not specified it defaults to 1. Enables the automatic key voicing in either high or low voices. Examples: KON KON 0 KON 1 KOFF Format: KOFF Disables automatic key voicing. (Note that KOFF 0 and KOFF 1 are accepted but you will probably never need this). ********* End of the Project 64 etext ComTALKER 64 (Currah Speech) manual *********