💾 Archived View for mirrors.apple2.org.za › archive › ground.icaen.uiowa.edu › Faqs › R012echo.htm captured on 2023-01-29 at 05:16:38.
-=-=-=-=-=-=-
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="Rubywand"> <meta name="GENERATOR" content="Mozilla/4.75 [en] (Win95; U) [Netscape]"> <title>R012echo Csa2 html</title> </head> <body> <address> <a NAME="top"></a><font color="#FFFFFF">.</font><font color="#666666"><font size=-1>The official Csa2 (comp.sys.apple2) Usenet newsgroup Apple II FAQs originate</font></font></address> <address> <font size=-1><font color="#666666"> from the</font> <b><font color="#009900">Gr</font><font color="#FF9900">o</font><font color="#FF0000">u</font><font color="#CC33CC">n</font><font color="#3366FF">d </font></b><font color="#666666">Apple II site. Ground Apple II administrator: Steve Nelson</font></font></address> <br><b><tt><font color="#FFFFFF"><font size=-2>.</font></font><font color="#666666">Csa2 FAQs-on-Ground Resource file: R012echo.htm</font></tt></b> <br><b><font color="#FFFFFF"><font size=+2>. .<a href="A2FAQs1START.html"><img SRC="entrance.jpg" BORDER=0 height=14 width=69></a>..<a href="A2FAQs2CONTENT.html"><img SRC="contents.jpg" BORDER=0 height=14 width=67></a>.</font></font></b> <br> <p><font face="Impact"><font size=+3>ECHO ][ SPEECH SYNTHESIZER MINI-MANUAL</font></font> <br> <p><tt>TABLE OF CONTENTS</tt> <p><tt>______________________________________________________________________</tt> <p><tt>INTRODUCTION</tt> <br><tt>INSTALLATION</tt> <br><tt>SPEECH GENERATOR</tt> <br><tt>SPEAKING FROM WITHIN AN APPLESOFT PROGRAM</tt> <br><tt>WORD STRUCTURE</tt> <br><tt>SPEECH EDITOR</tt> <br><tt>SPEECH EDITOR COMMANDS</tt> <br><tt>PHRASE CONSTRUCTION</tt> <br><tt>SAMPLE VOCABULARY</tt> <br><tt>SAMPLE PROGRAM</tt> <br><tt>HANGUPS?</tt> <br><tt>SPEECH EDITOR EXAMPLE</tt> <br><tt>PROGRAM EXAMPLE</tt> <br><tt>TABLES</tt> <br><tt>APPENDIX - SAMPLE VOCABULARY</tt> <br> <p><tt> INTRODUCTION</tt> <p><tt> Until recently, speech generation by a micro-computer required a</tt> <br><tt>fair amount of memory storage and hardware. With the advent of "Linear</tt> <br><tt>Predictive Coding" (a mathematical method of simulating the human vocal</tt> <br><tt>tract) the amount of memory needed to store speech was greatly reduced.</tt> <br><tt>Instead of storing the actual speech signal, only those LPC parameters</tt> <br><tt>needed to describe each particular speech sound are stored. This allows</tt> <br><tt>programs to have a large resident vocabulary without having to access a</tt> <br><tt>disk or tape every time an alternate response is needed. As an</tt> <br><tt>illustration, the sample vocabulary supplied with the ECHO ][ contains</tt> <br><tt>all of the letters of the alphabet, numbers, and over 100 other words in</tt> <br><tt>less than 2K of memory.</tt> <p><tt> The heart of the ECHO ][ is Texas Instrument's TMS 5200 speech</tt> <br><tt>processor. This integrated circuit is an upgraded version of the one</tt> <br><tt>used in the Speak & Spell (TM of Texas Instruments) that has been</tt> <br><tt>modified for use with an eight bit processor. The ECHO ][ has been</tt> <br><tt>designed so that all of the features of the TMS 5200 may be used with</tt> <br><tt>the APPLE, however only RAM based speech is used with the initial</tt> <br><tt>operating system. Empty sockets have been provided for standard</tt> <br><tt>vocabulary ROMs when they become available.</tt> <p><tt> The initial operating system is a RAM based phoneme system that was</tt> <br><tt>designed to provide flexibility and a further increase in memory</tt> <br><tt>efficiency over straight encoded words. By using the SPEECH EDITOR the</tt> <br><tt>user may create any word or phrase that he desires to have spoken from a</tt> <br><tt>program. This code is in a compact form and contains information on the</tt> <br><tt>sound, pitch, and duration of each phoneme. A second program called</tt> <br><tt>SPEECH GENERATOR is a binary program which interprets this code and</tt> <br><tt>passes the correct parameters to the ECHO ][ to speak the word. Only the</tt> <br><tt>SPEECH GENERATOR (1K bytes) and the actual vocabulary (10 to 20</tt> <br><tt>bytes/word) are needed for a program to speak.</tt> <p><tt> The address of the word to be spoken is "poked" to the SPEECH</tt> <br><tt>GENERATOR and a call is made to initiate the speech. The sections which</tt> <br><tt>follow discuss in detail how to install the card and the different</tt> <br><tt>components of the software system and how they are implemented.</tt> <br><tt>Following that is a step by step example of how to use the speech editor</tt> <br><tt>to create words and then a short program of how to access them from</tt> <br><tt>APPLESOPT basic. It is suggested that you read over the next sections</tt> <br><tt>first and then work through the example to become familiar with the</tt> <br><tt>system. You may also want to list the sample programs (RECITE and</tt> <br><tt>TALKING TYPEWRITER) or examine portions of the sample vocabulary with</tt> <br><tt>the SPEECH EDITOR as further examples.</tt> <br> <p><tt> INSTALLATION</tt> <p><tt> Before installing the ECHO ][ be sure all power is disconnected</tt> <br><tt>from the computer. The ECHO ][ card may be plugged into any of slots 2</tt> <br><tt>thru 5 of the APPLE ][. The speaker cord should be attached to the</tt> <br><tt>terminals on the back of the speaker and then plugged into the jack on</tt> <br><tt>the back of the ECHO ][ card. Replace the cover and the installation is</tt> <br><tt>complete. There is a short subroutine located within the SPEECH</tt> <br><tt>GENERATOR which will determine which slot the ECHO ][ is located in.</tt> <br><tt>This should be "called" at the start of a program before any speech is</tt> <br><tt>attempted and will be discussed in the next section.</tt> <p><tt> The SPEECH EDITOR disk is a 13 sector disk copied using DOS 3.2.1</tt> <br><tt>and will not run on a DOS 3.3 system without first using the BOOT13</tt> <br><tt>utility, It is suggested that a backup disk be made as soon as</tt> <br><tt>possible to protect its contents. If you have DOS 3.3 you may "muffin"</tt> <br><tt>it at this time.</tt> <br> <p><tt> SPEECH GENERATOR</tt> <p><tt> The SPEECH GENERATOR is a 1K binary module that contains the actual</tt> <br><tt>phoneme codes, routines for processing these codes along with their</tt> <br><tt>variables (pitch, length, and volume), and the routine for locating the</tt> <br><tt>ECHO ][ slot. If you "catalog" the supplied disk, you will see four</tt> <br><tt>different versions of the SPEECH GENERATOR. Each version resident in</tt> <br><tt>a different portion of memory to accommodate the HIRES pages and</tt> <br><tt>different size systems. The locations of these routines and their</tt> <br><tt>associated entry points are listed in TABLE 1 at the end of the manual.</tt> <p><tt> The Speak routine takes the compressed speech data beginning at the</tt> <br><tt>starting address (specified by the "calling" program), processes it,</tt> <br><tt>and then outputs it to the ECHO ][ for speaking. It will keep</tt> <br><tt>processing successive bytes of information until is comes actor's an</tt> <br><tt>"end" command ( HEX "AC" ) which is tacked onto the end of each word by</tt> <br><tt>the SPEECH EDITOR. At that point speech is terminated and control is</tt> <br><tt>returned to the main program.</tt> <p><tt> The SETSLT routine actually "looks" for the ECHO ][ card and then</tt> <br><tt>modifies the Speak routine accordingly. This routine should be called</tt> <br><tt>at the start of any speech program since different programs may be</tt> <br><tt>using different locations for the SPEECH GENERATOR. If your card is</tt> <br><tt>installed in slot 5 you don't really need to use the SETSLT routine,</tt> <br><tt>however if you change the location of the ECHO ][ card the program will</tt> <br><tt>not function properly.</tt> <p><tt> The SETSLT routine is also useful for determining whether there is</tt> <br><tt>an ECHO ][ card installed in the system. That way a program where</tt> <br><tt>speech is an enhancement but not a necessity may still be run without</tt> <br><tt>the speech. To do this a "PEEK" needs to be made to the location</tt> <br><tt>called "SLOT" (see Table 1). If the SETSLT routine cannot find an ECHO</tt> <br><tt>][ card it will set this location to 16 (10 Hex). An example is listed</tt> <br><tt>below:</tt> <p><tt> 10 LOBYTE = 16384: HYBYTE = 16385: SPEAK = 16386: NXTSPK = 16398:</tt> <br><tt> SLOT =16413: SETSLT = 17313</tt> <br><tt> 20 ECHO = 1: CALL SETSLT: X = PEEK (SLOT): IF X = 16 THEN ECHO =0</tt> <p><tt> In the above listing a flag labeled "ECHO" was set to one if a</tt> <br><tt>speech card was present or zero if there wasn't. This may be used</tt> <br><tt>later in the program to bypass speech routines which could cause the</tt> <br><tt>program to "hang" if no card was being used.</tt> <br> <p><tt> SPEAKING FRON WITHIN AN APPLESOFT PROGRAM</tt> <p><tt> In order for the SPEECH GENERATOR to say a word, it has to know the</tt> <br><tt>starting address of the word. Since BASIC deals with decimal numbers</tt> <br><tt>and the SPEECH GENERATOR deals with binary numbers, the address will</tt> <br><tt>have to be split into two portions and then poked to the SPEECH</tt> <br><tt>GENERATOR with two separate pokes. For convenience the addresses for</tt> <br><tt>these pokes have been labeled "HIBYTE" and "LOBYTE" and are listed in</tt> <br><tt>TABLE 1. A short routine to accomplish this is shown below: 100 AH</tt> <br><tt>= INT (ADD / 256) : AL = ADD - AH * 256 110 POKE HIBYTE, AH : POKE</tt> <br><tt>LOBYTE, AL Once that has been accomplished a call to the SPEAK</tt> <br><tt>routine will cause the word to be spoken. From a binary program the</tt> <br><tt>same thing may be accomplished with two STA instructions followed by a</tt> <br><tt>JSR.</tt> <br> <p><tt> WORD STRUCTURE</tt> <p><tt> Words may be broken up into separate and distinct sounds or</tt> <br><tt>phonemes. The ECHO ][ SPEECH EDITOR uses a set of forty-one possible</tt> <br><tt>phonemes along with two different types of pauses and a stop command</tt> <br><tt>(automatically appended at the end of words]. In general, voiced</tt> <br><tt>sounds (see Table 2) have variable pitch, duration, and volume.</tt> <br><tt>Unvoiced sounds (see Table 3) have these variables preset. There</tt> <br><tt>are sixteen different pitch levels available for voiced sounds. these</tt> <br><tt>range from one (highest) to sixteen (lowest). Varying the pitch allows</tt> <br><tt>the computer to ask questions or make exclamations. If the pitch is all</tt> <br><tt>one level, the speech will have a monotonic or robotic sound.</tt> <p><tt> The length of each voiced sound may be specified as being from one</tt> <br><tt>to eight 25 millisecond "frames" long. Unvoiced sounds are preset to be</tt> <br><tt>anywhere from two to five frames long depending on the sound. The</tt> <br><tt>"PA1" is the exception. This stops speech activity 25 to 200</tt> <br><tt>milliseconds specified in 25 millisecond increments. The primary use of</tt> <br><tt>the "PA1" is between words within a phrase or before stop plosives</tt> <br><tt>("8","K","T",etc.). THE "PA" pause gives a delay of 25 milliseconds</tt> <br><tt>however there is still some sound occurring during this period although</tt> <br><tt>it is faint. There are eight available volume levels ranging from</tt> <br><tt>one(softest) to eight loudest. The usual range is from five to eight</tt> <br><tt>for vowel sounds except when tapering off at the end of some words.</tt> <p><tt> Many commonly used sounds are made up of a combination of phonemes.</tt> <br><tt>An example is the sound "oh". To produce this sound an "01" sound must</tt> <br><tt>be followed by an "02" sound. Some other examples are "eye"</tt> <br><tt>("AH","I","E") and "oooh" ("U1","U2").</tt> <br> <p><tt> SPEECH EDITOR</tt> <p><tt> The SPEECH EDITOR is an APPLESOFT program which allows you to</tt> <br><tt>construct custom words and phrases for the ECHO ][. Basically, it</tt> <br><tt>arranges the sounds according to line numbers. These lines may be added</tt> <br><tt>to, deleted, modified, and inserted as necessary during word</tt> <br><tt>construction. When the word is finished it may be "saved" to RAM which</tt> <br><tt>also will assemble it into the format the SPEECH GENERATOR requires.</tt> <br><tt>>From there it may also be "saved" to the disk for later use. The word or</tt> <br><tt>phrase may be spoken at any time during the process to verify it for</tt> <br><tt>the correct sounds. The EDITOR commands are described in detail below</tt> <br><tt>and are also listed in TABLE 4. Only those letters enclosed in</tt> <br><tt>parenthesis actually need to be typed in for the command to be</tt> <br><tt>recognized.</tt> <p><tt> There are two modes which the EDITOR operates in. In the command</tt> <br><tt>mode, you will be prompted by a "#" and you may enter any of the</tt> <br><tt>commands listed below. In the add mode you will be expected to provide</tt> <br><tt>a sound or number specifying one of the variables. If you type a</tt> <br><tt>letter when a number is expected you will be asked to "RETYPE?". To</tt> <br><tt>exit the add mode and return to the command mode press the "RETURN" key</tt> <br><tt>When the cursor is in the "SOUND" column.</tt> <br> <p><tt> SPEECH EDITOR COMMANDS</tt> <p><tt> (A)DD - This command puts you in the add mode and allows you to add</tt> <br><tt>sounds to the end of the current word or phrase. You will be asked for</tt> <br><tt>the sound for each line and also the variables if it is a voiced sound</tt> <br><tt>or "PA1". To exit this mode press the "RETURN" key when the cursor is</tt> <br><tt>in the sound column.</tt> <p><tt> (AP)PEND - You may add a word or phrase from memory to the end of</tt> <br><tt>the current word or phrase. Keep in mind that there is a maximum of</tt> <br><tt>forty lines for the current word or phrase. To construct a longer</tt> <br><tt>phrase see the section on phrase construction.</tt> <p><tt> (C)ATALOG - This causes a DOS catalog of the current disk drive and</tt> <br><tt>then returns you to the command mode.</tt> <p><tt> (D)ELETE - When this command is entered you will be asked which line</tt> <br><tt>number you wish to delete. That line will be deleted and all</tt> <br><tt>subsequent lines will be shifted down one line to fill its place.</tt> <p><tt> (END) - This exits the SPEECH EDITOR, clears the screen, and returns</tt> <br><tt>you to APPLESOFT.</tt> <p><tt> (I)NSERT - If you wish to add lines within a word use this command.</tt> <br><tt>You will be asked which line you wish to insert the new line(s) in</tt> <br><tt>front of. This command puts you in the add mode however all new lines</tt> <br><tt>are inserted within the word rather than at the end. To exit press</tt> <br><tt>"RETURN".</tt> <p><tt> (L)IST - Re-lists the current word or phrase. If you wish to pause</tt> <br><tt>during the listing (useful if there is more than one screen of text)</tt> <br><tt>you may press the "SPACE BAR" and the listing will be halted. To resume</tt> <br><tt>the listing press the "SPACE BAR" again. This is similar to pressing</tt> <br><tt>CTRL-S when listing APPLESOFT programs.</tt> <p><tt> (LO)AD - When this is entered you will be asked whether you wish to</tt> <br><tt>load code from the current disk drive or if you wish to load text from</tt> <br><tt>the memory into the current word buffer. If you are accessing the disk,</tt> <br><tt>you will be asked for the name of the file along with the address to</tt> <br><tt>load it into. If you are loading text from memory you will have to</tt> <br><tt>specify the starting address. It will then load up to forty lines until</tt> <br><tt>it encounters a stop command within the text. If there are more than</tt> <br><tt>forty lines you will get a beep and a '*BUFFER FULL" warning.</tt> <p><tt> (M)ODIFY - This allows you to modify a line that has previously been</tt> <br><tt>entered. It is essentially the same as a "DELETE" command followed by</tt> <br><tt>an "INSERT" command. You will be asked which line you wish to modify.</tt> <br><tt>You will enter the add mode and all new lines will be inserted at that</tt> <br><tt>location.</tt> <p><tt> (N)EW - Clears the current word buffer so you may start formation of</tt> <br><tt>a new word. You will be asked if it is OK to clear. Any response other</tt> <br><tt>than a "Y" or a "YES" will abort the command.</tt> <p><tt> (PR)INT - If you wish to make a hard copy of the current word or</tt> <br><tt>phrase makeup use this command. You will be asked to type in the title</tt> <br><tt>which will be printed at the top of the listing. All output is printed</tt> <br><tt>to Slot #1.</tt> <p><tt> (SA)VE - You may save the current text to memory or code within</tt> <br><tt>memory to the current disk drive. If you are saving text you will be</tt> <br><tt>asked for the starting address to save it to. Keep a record of this and</tt> <br><tt>how many bytes are saved (it tells you) for future reference. A stop</tt> <br><tt>command is automatically added to the end of the word as it is saved.</tt> <br><tt>This is included in the total number of bytes that it tells you have</tt> <br><tt>been saved. If you are saving code to the disk, you must specify the</tt> <br><tt>file name, the starting address, and the number of bytes to be saved.</tt> <p><tt> (SP)EAK - By entering this command you may hear whatever is in the</tt> <br><tt>current buffer. This is useful for "debugging" words during</tt> <br><tt>construction. Like all other commands, this command is only available</tt> <br><tt>when in the command mode.</tt> <p><tt> (SPM)ENORY - This will speak words or phrases that have been</tt> <br><tt>previously stored in memory. You will be asked for the starting address</tt> <br><tt>at which time whatever is stored there will be spoken.</tt> <br> <p><tt> PHRASE CONSTRUCTION</tt> <p><tt> There are a few different ways in which words may be strung together</tt> <br><tt>to form phrases. For a short phrase you will want to load or enter the</tt> <br><tt>first word into the SPEECH EDITOR buffer and then append each additional</tt> <br><tt>word. You will then want to go back and insert a "PA1" in between each</tt> <br><tt>word.</tt> <p><tt> For longer phrases that include more than forty lines, each new word</tt> <br><tt>will have to be saved into memory directly following the previous one.</tt> <br><tt>Keep in mind that previously saved words will have a stop command</tt> <br><tt>tacked onto the end of them so save the new word one byte short of the</tt> <br><tt>actual calculated address (starting address of the previous word plus</tt> <br><tt>the number of bytes saved). You will also want to start each new word</tt> <br><tt>with a "PA1" so that there will be a pause between the words. Do not</tt> <br><tt>put the "PA1" at the end of the old word because it may cause the</tt> <br><tt>system to "hang" when it is spoken from the SPEECH EDITOR.</tt> <p><tt> One other way of producing a longer phrase is that used in the</tt> <br><tt>sample program "RECITE" on the disk. Unlike the method above, the stop</tt> <br><tt>commands are not eliminated and no "PA1" pauses are inserted. The</tt> <br><tt>starting address of the first word is given to the SPEECH GENERATOR and</tt> <br><tt>it is spoken in the normal fashion. Then for each successive word to be</tt> <br><tt>spoken a call is made to the "NXTSPK" routine. The SPEECH GENERATOR</tt> <br><tt>will already be painting to the next byte in memory after speaking the</tt> <br><tt>previous word so it will already have the address of the next word. To</tt> <br><tt>use this type of Phrase you must know how many total words are to be</tt> <br><tt>spoken and then do the same number of calls to the "SPEAK" and "NXTSPK"</tt> <br><tt>routines.</tt> <br> <p><tt> SAMPLE VOCABULARY</tt> <p><tt> The sample vocabulary on the enclosed disk contains 175 words,</tt> <br><tt>letters, and numbers for use from within your programs or as examples on</tt> <br><tt>coding your own words. The file name of the code is "VOCABULARY" and</tt> <br><tt>should be loaded into address 17408. A complete listing of the words</tt> <br><tt>and their starting addresses is given in the appendix at the back of</tt> <br><tt>this manual.</tt> <p><tt> "VOCABULARY" may be loaded into other parts of memory but the</tt> <br><tt>starting addresses will have to be modified accordingly when accessing</tt> <br><tt>words from a program.</tt> <br> <p><tt> SAMPLE PROGRAMS</tt> <p><tt> There are two sample programs provided on the disk. The first one,</tt> <br><tt>"TALKING TYPEWRITER" will say each letter and number as it is typed on</tt> <br><tt>the keyboard. The second one, "RECITE" will say each word of the sample</tt> <br><tt>vocabulary. Both of these programs are APPLESOFT programs and are run in</tt> <br><tt>the usual manner.</tt> <br> <p><tt> HANGUPS?</tt> <p><tt> If you try to speak a phrase that begins or ends with a "PA1" or has</tt> <br><tt>two "PA1's" embedded in it, the entire program may "hang". It may also</tt> <br><tt>"hang" if you give it the starting address of some other data rather</tt> <br><tt>than phoneme encoded data. When this occurs the only way to regain</tt> <br><tt>control of the computer is to press reset. If you are using the speech</tt> <br><tt>editor you may return to the program with variables intact by entering</tt> <br><tt>"GOTO 1000". You will have to re-list the current word or phrase and</tt> <br><tt>you will no longer have the headings at the top of the screen.</tt> <p><tt> There is another problem that may occur anytime after the above</tt> <br><tt>situation occurs or if RESET is pressed when the ECHO ][ is talking.</tt> <br><tt>The next time SETSLT is called to find which slot the ECHO ][ is in, it</tt> <br><tt>probably won't find it. There are two ways to get around this without</tt> <br><tt>having to turn off the computer and reboot from scratch. One is to</tt> <br><tt>always install the ECBO ][ card in slot 5 and never use the SETSLT</tt> <br><tt>routine. The other is to POKE "255" to one of the addresses which pulls</tt> <br><tt>the DEVICE SELECT (PIN 41) low on the slot the ECHO ][ is in.</tt> <br> <p><tt> SPEECH EDITOR EXAMPLE</tt> <p><tt> In this section we will use the SPEECH EDITOR to generate and save</tt> <br><tt>the phrase "an Apple ][ computer" and then write a short APPLESOFT</tt> <br><tt>program to say the lar9et phrase "This is an Apple ][ computer". Before</tt> <br><tt>proceeding you should install the ECHO ][ card according to the</tt> <br><tt>directions previously given.</tt> <p><tt> To begin you should boot up the supplied disk and run the SPEECH</tt> <br><tt>EDITOR program. After it has finished loading from the disk your screen</tt> <br><tt>should be blank except for the headings at the top and you should be</tt> <br><tt>prompted with a "0". Whenever this prompt is displayed the program is</tt> <br><tt>waiting for a command. For clarity, in this example we will always list</tt> <br><tt>an entire command rather than just the first letter(s). All commands</tt> <br><tt>ate followed by a <CR>.</tt> <p><tt> Since you will be using some of the words from the sample</tt> <br><tt>vocabulary, you will have to first load it from the disk into memory.</tt> <br><tt>To do this type in the command: LOAD. You are then given two options:</tt> <br><tt>to load code from the disk or to load text from memory. You want to</tt> <br><tt>load code from the disk so enter "1". Next you will be asked for the</tt> <br><tt>file name. The sample vocabulary is saved under the name of "VOCABULARY"</tt> <br><tt>so type this in. When it asks for what address to load it into type in</tt> <br><tt>"17408". All addresses listed in the back of this manual assume that</tt> <br><tt>the vocabulary has been loaded into this location.</tt> <p><tt> After the file has been loaded you should be back in the control</tt> <br><tt>mode of the editor and the "#" should reappear. The first word of our</tt> <br><tt>phrase is "an". This is not one of the words in the sample vocabulary</tt> <br><tt>but can easily be made by modifying the word "and". Once again you will</tt> <br><tt>want to use the LOAD command, however this time you will want to use</tt> <br><tt>option "2" instead of "1". When asked for the address to load the text</tt> <br><tt>from you should enter the address listed in the appendix for "and".</tt> <br><tt>This is "17434" so type it in now. After a brief pause your screen</tt> <br><tt>should appear as follows:</tt> <br> <p><tt>LINE# SOUND PITCH LENGTH VOLUME</tt> <p><tt>17 PA1 2</tt> <br><tt>18 K</tt> <br><tt>19 UH 7 3 6</tt> <br><tt>20 M 8 2 6</tt> <br><tt>21 PA1 1</tt> <br><tt>22 P</tt> <br><tt>23 Y 4 1 6</tt> <br><tt>24 IU 4 1 6</tt> <br><tt>25 U2 4 3 6</tt> <br><tt>26 PA1 1</tt> <br><tt>27 T</tt> <br><tt>28 ER 6 2 6</tt> <br><tt>29 ER 8 2 6</tt> <br><tt>30 ER 10 2 5</tt> <br> <p><tt> After pressing <CR> to return to the command mode the entire buffer</tt> <br><tt>will be re-listed on the screen. Since the screen isn't long enough to</tt> <br><tt>accommodate the entire buffer the first lines will no longer appear. To</tt> <br><tt>re-examine the first lines, enter the LIST command and while it is</tt> <br><tt>listing press the space bar. The listing will halt at that point and</tt> <br><tt>will continue only when the space bar is pressed again. A listing may be</tt> <br><tt>stopped and restarted in this manner as many times as desired.</tt> <p><tt> Now that the phrase "an apple two computer" has been finished it</tt> <br><tt>needs to be saved to memory and then to the disk for future use. The</tt> <br><tt>SPEECH EDITOR and SPEECH GENERATOR.CODE2 use memory locations below</tt> <br><tt>17408. Likewise, the sample vocabulary resides in memory locations</tt> <br><tt>17408 to 19399. Therefore when you save the phrase you just constructed</tt> <br><tt>it should be put above these locations. To save the phrase enter the</tt> <br><tt>SAVE command. As with the LOAD command you will be asked whether you are</tt> <br><tt>saving text to memory or memory to disk. Enter a "2" for text to memory</tt> <br><tt>and when you are asked for the address to save to enter "19400". Note</tt> <br><tt>how many bytes were saved (56) because you will need to know that to</tt> <br><tt>save it to the disk.</tt> <p><tt> The compressed binary code for your phrase is now in memory</tt> <br><tt>starting at address 19400. To save the phrase to the disk once again</tt> <br><tt>enter the SAVE command, but this time select the first option. For a</tt> <br><tt>file name you can use "AN APPLE TWO COMPUTER" and for the address to</tt> <br><tt>save from type in the address where it was previously saved, in this</tt> <br><tt>case 19400. The length of the phrase is 56 bytes as noted above.</tt> <p><tt> At this point the entire vocabulary to say the phrase "this is an</tt> <br><tt>apple two computer" is stored either within the sample vocabulary or</tt> <br><tt>within the file that you just created. The entire phrase could have been</tt> <br><tt>constructed and placed within a single file but in order to more</tt> <br><tt>effectively demonstrate how to access speech from within a program you</tt> <br><tt>will be accessing a combination of single words and a phrase.</tt> <br> <p><tt> The program listed will say the sample phrase every time a <CR> is</tt> <br><tt>pressed. The "REM" statements pretty well explain its operation and what</tt> <br><tt>portion of the program does what.</tt> <br> <p><tt>10 HIMEM: 7167</tt> <p><tt>15 REM SETS HIMEM BELOW THE LOCATION OF THE SPEECH ROUTINES.</tt> <p><tt>20 D$ = CHRS (4)</tt> <p><tt>25 REIUI SETS D$ UP AS A CONTROL-D FOR DOS COMMANDS.</tt> <p><tt>30 PRINT D$;"BLOAD SPEECH GENERATOR.CODE0"</tt> <p><tt>35 REM LOADS IN THE SPEECH GENERATOR.CODE0 INTO $1C00 TO $1CFF.</tt> <p><tt>40 PRINT D$;"BLOAD VOCABULARY"</tt> <p><tt>45 REM LOADS THE SAMPLE VOCABULARY INTO LOCATION 17408.</tt> <p><tt>50 PRINT D$;"BLOAD AN APPLE TWO COMPUTER"</tt> <p><tt>55 REM LOADS THE PHRASE INTO LOCATION 19400.</tt> <p><tt>60 LOBYTE = 7168:HIBYTE = 7169:SPEAK = 7170:NXTSPK = 7182:SLOT = 7197:</tt> <br><tt> SETSLT = 8097</tt> <p><tt>65 REM SETS UP THE VARIOUS ADDRESSES USED WITH SPEECH GENERATOR.CODEO.</tt> <p><tt>70 CALL SETSLT:A = PEEK (SLOT): IF A = 16 THEN HOME : PRINT "PLEASE</tt> <br><tt> INSERT AN ECHO II CARD": END</tt> <p><tt>75 REM DETERMINES WHICH SLOT THE ECHO II CARD IS IN. IF NO CARD IS</tt> <br><tt> INSTALLED IT WARNS THE USER AND ENDS THE PROGRAM.</tt> <p><tt>80 HOME : INPUT "PRESS THE <CR> FOR A DEMOSTRATION ";X{body}lt;/tt> <p><tt>85 REM CLEARS THE SCREEN AND WAITS FOR A COMMAND TO START.</tt> <p><tt>90 ADD = 19070: GOSUB 200</tt> <p><tt>95 REM SETS UP THE ADDRESS FOR THE WORD "THIS" AND THEN JIMPS TO THE</tt> <br><tt> ROUTINE THAT WILL OUTPUT THE ADDRESS AND SPEAK IT.</tt> <p><tt>100 FOR A = 1 TO 100: NEXT</tt> <p><tt>105 REM CAUSES A PAUSE BETWEEN THE WORDS "THIS" AND "IS".</tt> <p><tt>110 ADD = 18184: GOSUB 200</tt> <p><tt>115 REM SETS UP THE ADDRESS FOR THE WORD "IS" AND THEN JUMPS TO THE</tt> <br><tt>ROUTINE</tt> <br><tt> THAT WILL OUTPUT THIS ADDRESS AND SPEAK IT.</tt> <p><tt>120 FOR A = 1 TO 100: NEXT</tt> <p><tt>125 REM CAUSES A PAUSE BETWEEN THE WORD "IS" AND THE FOLLOWING PHRASE.</tt> <p><tt>130 ADD = 19400: GOSUB 200</tt> <p><tt>135 REM SETS UP THE ADDRESS FOR THE PHRASE "AN APPLE TWO COMPUTER" AND</tt> <br><tt> THEN JUMPS TO THE ROUTINE THAT WILL OUTPUT THE ADDRESS AND THEN</tt> <br><tt> SPEAK IT.</tt> <p><tt>140 GOTO 80</tt> <p><tt>200 AH = INT (ADD/256):AL = ADD -AH * 256</tt> <p><tt>205 REMI SPLITS THE ADDRESS UP INTO HIGH AND LOW ADDRESSES LESS THAN</tt> <br><tt> 256 AND THAT CAN BE POKED INTO A BINARY ROUTINE.</tt> <p><tt>210 POKE HIBYTE,AH: POKE LOBYTE,AL</tt> <p><tt>215 REM POKES THE ADDRESSES DETERMINED ABOVE INTO THE LOCATIONS USED</tt> <br><tt> BY THE SPEECH GENERATOR.CODE.</tt> <p><tt>220 CALL SPEAK</tt> <p><tt>225 REM THIS CALLS THE ROUTINE THAT SPEAKS THE WORD OR PHRASE STARTING</tt> <br><tt> AT THE ADDRESS POKED ABOVE.</tt> <p><tt>230 RETURN</tt> <br> <br> <p><tt>TABLE 1 -SPEECH GENERATOR ADDRESSES</tt> <p><tt>SPEECH GENERATOR.CODE0 - $1COO TO S1FFF</tt> <br><tt>SPEECH GENERATOR.CODE1 - $3COO TO $3FFF</tt> <br><tt>SPEECH GENERATOR.CODE2 - $4000 TO $43FF</tt> <br><tt>SPEECH GENERATOR.CODE3 - $6000 TO $63FF</tt> <br> <p><tt>VER LOBYTE HIBYTE SPEAK NXTSPK SLOT SETSLT</tt> <p><tt>0 7168 7169 7170 7182 7197 8097</tt> <br><tt> $1C00 $1C01 $1C02 $1COE $1C1D $1FA1</tt> <p><tt>1 15360 15361 15362 15374 15389 16289</tt> <br><tt> $3C00 $3C01 $3C02 $3COE $3C1D $3FA1</tt> <p><tt>2 16384 16385 16386 16398 16413 17313</tt> <br><tt> $4000 $4001 $4002 $400E $401D $43A1</tt> <p><tt>3 24576 24577 24578 24590 24605 25505</tt> <br><tt> $6000 $6001 $6002 $600E $601D $63A1</tt> <br> <p><tt>TABLE 2 - SOUNDS WITH SELECTABLE VARIABLES</tt> <br> <p><tt>Al - late E - speak M - many OO2 - book</tt> <p><tt>A2 - late EH - letter N - nice U1 - tune</tt> <p><tt>AE - dad ER - hurry NG - long U2 - tune</tt> <p><tt>AH - bother I - finger O1 - oh UH - fun</tt> <p><tt>AW - call IU - you O2 - oh Y - you</tt> <p><tt>L - like OO1 - book PA1 - pause</tt> <br> <br> <p><tt>TABLE 3 - SOUNDS WITH PRESET VARIABLES</tt> <br> <p><tt>B - baby G - get R - red TH1 - then</tt> <p><tt>CH - choose H - hello S - see V - very</tt> <p><tt>D - dog J - jet SH - shoe W - will</tt> <p><tt>DT - butter K - kick T - too Z - zero</tt> <p><tt>F - if P - print TH - think PA - pause</tt> <br> <br> <p><tt>TABLE 4 - SPEECH EDITOR COMMANDS</tt> <p><tt>(A)DD</tt> <br><tt>(END)</tt> <br><tt>(N)EW</tt> <br><tt>(AP)PEND</tt> <br><tt>(I)NSERT (PR)INT</tt> <br><tt>(C)ATALOG</tt> <br><tt>(L)IST</tt> <br><tt>(SA)VE</tt> <br><tt>(D)ELETE</tt> <br><tt>(LO)AD</tt> <br><tt>(SP)EAK</tt> <br><tt>(M)ODIFY</tt> <br><tt>(SPM)EMORY</tt> <br> <br> <p><tt>APPENDIX - SAMPLE VOCABULARY</tt> <br> <p><tt>A...........17408 ADDED.......17425 ANSWER......17444</tt> <br><tt>ADD.........17417 AND.........17434 APPLE.......17457</tt> <p><tt>B...........17469 BLUE........17490 BYTE........17510</tt> <br><tt>BLACK.......17477 BY..........17502</tt> <p><tt>C...........17521 CLOSE.......17551 CONTROL.....17595</tt> <br><tt>CATALOG.....17532 COLOR.......17570 CORRECT.....17610</tt> <br><tt>CENTS.......17548 COMMA.......17583</tt> <p><tt>D...........17624 DISK........17670 DO..........17724</tt> <br><tt>DATE........17632 DIVIDE......17680 DOLLARS.....17732</tt> <br><tt>DECIMAL.....17641 DIVIDED.....17695 DON'T.......17747</tt> <br><tt>DELETE......17656 DRIVE.......17713</tt> <p><tt>E...........17758 ELEVEN......17800 ERROR.......17B51</tt> <br><tt>EIGHT.......17765 END.........17815 ESCAPE......17862</tt> <br><tt>EIGHTEEN....17775 ENTER.......17825 EXCLAMATION.17B74</tt> <br><tt>EIGHTY......17789 EQUALS......17838</tt> <p><tt>F...........17899 FIRST.......17942 FORTY.......17975</tt> <br><tt>FALSE.......17905 FILE........17953 FOUR........17987</tt> <br><tt>FIFTEEN.....17916 FIVE........17965 FOURTEEN....17997</tt> <br><tt>FIFTY.......17930</tt> <p><tt>G...........18012 GOOD........18028 GUESS.......1B048</tt> <br><tt>GAME........180ZO GREEN.......18039</tt> <p><tt>H...........18057 HELP........1S075 HUNDRED.....18098</tt> <br><tt>HELLO.......18065 HIGH........18088</tt> <p><tt>I...........18112 INCORRECT...18134 IS..........18184</tt> <br><tt>IF..........18121 INPUT.......18153 IT..........18190</tt> <br><tt>IN..........18127 INSERT......18168</tt> <p><tt>J...........18198</tt> <p><tt>K...........18206 KEY.........18214 KEYBOARD....1B222</tt> <p><tt>L...........18236 LIST........18256 LOW.........18279</tt> <br><tt>LEFT........18245 LOAD........18267</tt> <p><tt>M...........1B290 MILLION.....18328 MULTIPLY....18355</tt> <br><tt>MANY........18301 MINUS ......18341 MULTIPLIED..18376</tt> <br><tt>MEMORY......18314</tt> <p><tt>N...........18398 NINE........18431 N0..........18480</tt> <br><tt>NAME........18409 NINETEEN....18442 NOW.........18489</tt> <br><tt>NEXT........18418 NINETY......18462 NUMBER......18497</tt> <p><tt>0...........18510 ONE.........18534 OR..........18555</tt> <br><tt>OFF.........18519 OPEN........18542 OUT.........18564</tt> <br><tt>ON..........18525</tt> <p><tt>P...........18573 PERIOD......18614 PRESS.......1B648</tt> <br><tt>PARENTHESIS.18583 PLUS........18627 PRINT.......18658</tt> <br><tt>PERCENT.....18600 POUND.......18638 PROGRAM.....18670</tt> <p><tt>Q...........186S5 QUESTION....18697</tt> <p><tt>R...........18711 REMOVE......18729 RETURN......18759</tt> <br><tt>RED.........18720 REPEAT......18743 RIGHT.......18774</tt> <br> <p><tt>S...........18785 SEVENTY.....18864 SPELL........18933</tt> <br><tt>SAVE........18792 SIX.........18878 START.......18942</tt> <br><tt>SECOND......18801 SIXTEEN.....18888 STOP........18953</tt> <br><tt>SEMICOLON...18814 SIXTY.......18903 SUBTRACT....18964</tt> <br><tt>SEVEN.......18835 SORRY.......18915 SUBTRACTED..18979</tt> <br><tt>SEVENTEEN...18845 SPACE.......18925</tt> <p><tt>T...........18997 THIRTEEN....19047 TRY.........19109</tt> <br><tt>TAPE........19007 THIRTY......19060 TRUE........19119</tt> <br><tt>THAT........19016 THIS........19070 TWELVE......19128</tt> <br><tt>TEN.........19025 THOUSAND....19077 TWENTY......19140</tt> <br><tt>THE.........19033 THREE.......19089 TWO.........19151</tt> <br><tt>THE1........19041 TIME........19098 TYPE........19159</tt> <p><tt>U...........19170 UH OH.......191B1 UNDERSTAND..19190</tt> <p><tt>V...........19207 VALUE.......19217</tt> <p><tt>W...........19231 WHERE.......19277 WILL........19303</tt> <br><tt>WAS.........19249 WHITE.......19285 WITH........19311</tt> <br><tt>WHAT........19258 WHO.........19295 WRONG.......19318</tt> <br><tt>WHEN........19269</tt> <p><tt>X...........19326</tt> <p><tt>Y...........19335 YES.........19358 YOUR........19366</tt> <br><tt>YELLOW......19345</tt> <p><tt>Z...........19377 ZERO........19387 END OF FILE.19399</tt> <p><b><font color="#FFFFFF"><font size=-1>. .</font></font><a href="#top"><font color="#999999">to</font><font color="#FFFFFF"><font size=-2>.</font></font><font color="#666666">top</font></a></b> <br> <br> </body> </html>