C=commodore
MAGIC VOICE
SPEECH MODULE
The most realistic voice synthesizer on the market

front cover
Use with Commodore's growing family of TALKING software on cartidge and disk... or... write YOUR OWN TALKING PROGRAMS in BASIC. Easy to use manual with examples included.

back cover

VOCABULARY
235 words built-in - additional vocabulary can be loaded from optional cartidges or disks
SPEECH RATE
Variable from .65 to 1.4 times 'standard' speed
LANGUAGES
Programmable in Commodore BASIC - 4 new commands * Also programmable in 6502 machine language
FEATURES
Simultaneous voice and music generation * Simultaneous voice and graphics action * Expandable with C 64 compatible game cartridges * Top loading ROM cartridge port - accepts talking and non-talking cartridges
COMPUTERS
C 64 and SX 64
TALKING CARTRIDGES
Recreational: Gorf and Wizard of Wor
Educational: Counting Bee, A Bee C's, The Spelling Bee, and The Magic Garden Talking Book Series
Business: Magic Desk 1+
plus the table of Appendix 5.2

Contents

YOUR COMMODORE COMPUTER TALKS!
Your Commodore64 computer has a VOICE... In fact, lots of voices! Wether you're a student, teacher, parent, hobbyist, executive, novice programmer or expert... you're going to enjoy your Commodore Magic Voice Speech Module.

Here's a short list of the Magic Voice's special features:

Your Magic Voice plugs directly into the cartidge port of your Commodore64 or SX-64 Portable Color Computer. You can use diskette, tape or cartidge software (cartidges plug into the Magic Voice's convinient top-loading cartidge port). The Magic Voice will give voice to programs that talk. Most programs that don't include speech operate normally when the Magic Voice is plugged in. However, some older programs may not work. If you have difficulty using a non-speaking program while the module is plugged in, turn off the computer and then remove the module.

The Magic Voice speaks in a pleasant female voice, and has the ability to generate natural sounding human speech using male, female, children's and character voices. The module comes with its own built-in vocabulary of 235 utterances, and you can add thousands of other words using speech-compatible cartidges, diskettes and tapes.

Commodore's "talking" software includes the innovative "Magic Desk" series, learning programs like "A Bee C's", and talking games like "Wizard of Wor" and "Gorf!" We've only just begun to explore the educational and recreational opportunities created by talking computers: foreign language training, elementary education, creative strategy games - the possibilities are endless.

If you're a computer programmer, you can use the Magic Voice in your own BASIC or ASSEMBLY LANGUAGE progams! If you develop a program you'd like us to consider as a software product, send a sample to our Software Acquisitions Manager in care of Commodore Software, 1200 Wilson Drive, West Chester, PA 19380.

To find out about new speech-compatible products as they're introduced, see your Commodore dealer, and read Commodore's two computer magazines (POWER/PLAY and Commodore).

1. INSTALLING YOUR MAGIC VOICE SPEECH MODULE
1. Using A Television
It's easy to set up the Magic Voice with your COMMODORE64 or SY-64 computer. Just follow these simple steps:

STEP 1:
SET UP YOUR COMPUTER for use with television as described in your User's Guide. Do NOT turn it on yet.
STEP 2:
PLUG THE MAGIC VOICE INTO THE CARTRIDGE PORT of your computer.
STEP 3:
LOCATE THE AUDIO CABLE that comes packed with your speech module
STEP 4:
TAKE THE PHONO PLUG of the cable and PLUG IT INTO THE "AUDIO OUT" SOCKET on the speech module (there are two sockets on the side of the module. The audio in and out sockets are marked on the bottom of the module.
STEP 5:
TAKE THE 5-pin DIN AUDIO/VIDEO CONNECTOR of your AUDIO CABLE and PLUG IT INTO THE AUDIO/VIDEO SOCKET of the computer.
STEP 6:
TURN ON THE TELEVISION SET. TURN THE VOLUME UP.
(Note: If you're using a speech-compatible cartridge, PLUG IT INTO THE CARTIDGE SLOT on top of the speech module... DON'T EVER PLUG IN A CARTRIDGE UNLESS YOUR COMPUTER IS TURNED OFF!)
STEP 7:
TURN ON THE COMPUTER.
Note: If you're using pre-recorded software on DISKETTE or TAPE, LOAD the program at this time and RUN it.)
STEP 8:
TEST THE MAGIC VOICE by typing the following exactly as shown (note that to obtain the quotation marks (") around the work HI, you should hold down the SHIFT key and press the 2 key at the same time):
SAY "HI" (and press the RETURN key)
The computer should say "HI", and you're ready to go. If it does not respond properly, adjust the volume and fine tuning adjustments on your television and try again... then consult the TROUBLESHOOTING CHART on Page 4.

*Note: The Commodore Magic Voice may be used with both the COMMODORE 64 and COMMODORE SX-64 computers, but we refer to COMMODORE 64 throughout the text, since the SX-64 portable computer is compatible with the COMMODORE 64 and works identically when used with the Speech Module.

2. Using A Monitor
Using the Magic Voice with a monitor may yield better sound quality than a television set. Commodore makes a low-priced color monitor which is specially engineered to provide a maximum sound and picture quality on Commodore computers. The following steps describe how to use the speech module with Commodore Model 1701/1702 Color Monitor:

STEP 1:
SET UP YOUR COMPUTER for use with MONITOR, as descibed in your User's Manual. Do NOT turn it on yet.
STEP 2:
PLUG THE MAGIC VOICE INTO THE CARTRIDGE PORT of your computer. The cartidge slot and COMMODORE label on the module must be facing UP.
STEP 3:
Note: you will NOT USE THE AUDIO CABLE that comes packed with your Magic Voice module
STEP 4:
TAKE the long "TV CABLE" that comes with your COMMODORE 64 (it has identical PHONO PLUGS at each end) and PLUG ONE END INTO THE "AUDIO OUT" SOCKET on the speech module. PLUG THE OTHER END INTO THE "AUDIO" SOCKET on the front righthand corner of your Commodore Model 1701/1702 monitor.
STEP 5:
TAKE THE "MONITOR CABLE" that comes with your Commodore monitor and PLUG THE LARGE AUDIO/VIDEO CONNECTOR INTO THE AUDIO/VIDEO SOCKET on your computer (the AUDIO/VIDEO connector is a round metal plug which has either 5 pins or 8 pins). Plug the VIDEO connector into the "AUDIO" SOCKET on your monitor. Connect the AUDIO PLUG on the monitor cable to the "AUDIO IN" SOCKET on the speech module.
STEP 6:
Steps 6-8 are the same as for a television set (above).
A Special Note for COMMODORE Color Monitor Owners:
The Commodore Model 1701/1702 Color Monitor has a special capability which can boost the quality even more on your COMMODORE 64... using the 3 sockets on the BACK of the monitor labelled "Chroma," Luma" and "Audio." If you have a Commodore 64 with a 8-pin DIN audio/video connector, you can obtain a cable which has an 8-pin DIN connector on one end and 3 phono plugs on the other. You can improve the picture and sound quality by plugging one plug into the CHROMA socket, one plug into the LUMA socket, and the AUDIO plug into the AUDIO socket (you may have to experiment to determine which plug gets CHROMA and LUMA sockets). When using the MAGIC VOICE with this arrangement, use the "TV CABLE" from your COMMODORE 64 to connect the AUDIO OUT socket of the speech module to the AUDIO socket on the back of your Commodore monitor, and connect the AUDIO PLUG on the 8-pin DIN cable into the "AUDIO IN" socket on the speech module.

3. Using Your Own Audio System
You can channel the sound output from the Magic Voice through your own audio system, but if you do, remember that the SID CHIP which creates music synthesis and sound effects in the COMMODORE 64 operates SEPERATELY from the Magic Voice. This means if you use a cable to connect the AUDIO OUT socket on the module to the AUDIO IN socket on your audio system, you will need some special cables to connect the audio portion of the signal coming from the computer's music synthesizer. Do this by plugging the "AUDIO OUT" PLUG coming out of the computer into the "AUDIO IN" SOCKET on the speech module.

4. Troubleshooting Tips
If you've tried using your Magic Voice and your computer still isn't talking, try these troubleshooting steps:

  1. Make sure your computer operates normally without the Magic Voice speech module.
  2. Tune the fine tuning dial on your TV or monitor and go to Step 9.
  3. Turn up the volume on your television set/monitor/system.
  4. Turn off the power to your 64 and make sure the cartridge is firmly seated in the expansion slot on your computer.
  5. Check the audio cable to make sure it's connected to AUDIO OUT and not AUDIO IN.
  6. If using a TV, make sure the switchbox is set to "computer" and not "TV", and you're tuned to the right channel (Channel 4 or 4. See your Commodore 64 User's Guide).
  7. turn the computer OFF and ON and try again.
  8. If using a Commodore monitor, make sure the "front/rear" selector switch on the back of the monitor is properly set.
  9. Retype the SAY test command and press the RETURN key. The SAY test command is SAY "HI" < return >.
2. MAKING YOUR COMMODORE 64 TALK
1. Your First Words
Type These lines exactly as shown:
SAY"THE"(and press the RETURN key)
SAY"COMMODORE"(and press the RETURN key)
SAY"COMPUTER"(and press the RETURN key)
SAY"IS"(and press the RETURN key)
SAY"TERRIFIC"(and press the RETURN key)

Your computer has a female voide! Of yourse, special software can create any type of voice - man, child, cartoon character - even sound effects. One of the first voices created by Commodore's speech technology researchers was the robot voice in the best-selling game WIZARD OF WOR, available on cartridge for the Commodore 64.

As you've seen, you can SAY any of the words in the Magic Voice built-in vacabulary, ONE WORD AT A TIME, if you...

  1. Type the SAY command
  2. Enclose the word you want to say in QUOTATION MARKS
  3. Press the RETURN key to activate speech

2. Making Plural Words Let's learn another secret of the Magic Voice - how to make plural words, words that end in "S". Try typing this example as shown:
SAY"COMPUTER":SAY"SSSS"(press the RETURN key)
Did you hear "S" at the end of the word "COMPUTER"? There's a special utterance in the Magic Voice vocabulary which produces an "S" sound for pluralizing words... the special utterance is spelled with FOUR "S's".

Before we learn how to write simple computer programs that "talk", let's take a quick look at the Magic Voice built-in vocabulary...

3. Using the Built-in Vocabulary There are 235 utterances built into the Magic Voice vocabulary, which means you can mix and match a wide range of words and sounds to come up with all types of sentences. Colors, numbers, math words, computer words... they're all here. Most of the common words you'll want to use in your programs are included.

Take a look at the alphabetical listing on Page 22. Notice that each word also has a VOCABULARY NUMBER. If you like, you can use the number instead of the word. For example, look at the word "READY" which has the VOCABULARY NUMBER 144. Now try these two examples:
SAY"READY"(and press the RETURN key)
SAY144(and press the RETURN key)

Both examples have the same result. Remember... if you SAY an utterance be sure to put it in quotation marks. If you SAY the VOCABULARY NUMBER of the utterance, do not use quotation marks just type SAY and the number.

4. Beginner's Programming Tips - How Basic Programs Work
So for you've typed all commands DIRECTLY into the computer... but a much more efficient way i sto type the same commands using a COMPUTER PROGRAM. Computer programs for your COMMODORE 64 are written in the computer language called BASIC, which is built into your Commodore computer.

If this is your first experience with BASIC PROGRAMMING, the following information may help you get started with the examples we're going to explore:

A BASIC program consists of one or more NUMBERED LINES with BASIC commands on each line. Every time you type a number at the far left margin followed by a valid BASIC command, your computer REMEMBERS what you typed and stores that line in its memory. BASIC programs are typically numbered by tens(10,20,30 and so on)... that's so you can go back later and insert additional lines(11,12,13, etc.). A BASIC program using the Magic Voice looks like this... try typing it:
10 SAY"COMMODORE"(and press the RETURN key)
20 SAY"COMPUTER"(and press the RETURN key)
30 SAY"SSSS"(and press the RETURN key)

Type the word RUN and press the RETURN key to hear the program, then type the word LIST and press RETURN to see the program listed. Here are a few "basic" rules for beginning programmers:

Counting From 1 to 10
If you type the SAY command with a word, the word must be in quotation marks, but if you type the SAY command with the NUMBER on the word, you don't use quotation marks. This NUMBERING feature was included because using numbers allows BASIC programmers to conserve space in their programs. Here's a short example:
10 FORX=1TO10(and press the RETURN key)
20 SAYX(and press the RETURN key)
30 NEXT(and press the RETURN key)

Type the word RUN and press the RETURN key. Note that the vocabulary numbers zero to ten are the same as the spoken numbers.

SAYing the Alphabet
Now type the following line exactly as shown, then type the word RUN and press the RETURN key:
10 FORX=21TO46 (press RETURN)
This is the same as the counting program, except here we substituted vocabulary numbers 21 to 46, which are the numbers of the letters A through Z.

Well, your computer is starting to talk - but what if you want to create longer sentences? This requires some simple computer programming... wheter you're a beginner or expert, you'll be surprised how easily you can program speech using the Commodore Magic Voice.

5. Your First Sentences
Here's a little program which speaks a sentence. Type the word NEW and press RETURN to erase previous program, and type the example as shown:
10 FORX = 1TO5
20 READA$
30 SAYA$:NEXT
40 DATACOMMODORE,COMPUTER,SSSS,ARE,TERRIFIC

Type RUN and press RETURN. Is this a terrific sentence? Here's how the program works:

Line 10: A FOR...NEXT loop tells the computer to count from 1 to 5. The NEXT command farther down in the program tell the computer to perform all the actions between the FOR and NEXT commands... in this case, READ and SAY 5 words from the DATA statements.

Line 20: READA$ means look at the DATA in Line 40 and "read" it one item at a time (there are 5 items), all seperated by commas.

Line 30: SAYA$ tells the speech module to speak each item, one item at a time. The NEXT command is the other part of the FOR...NEXT loop. FORX = 1TO5 told the computer to perform the following actions 5 times (READA$ and SAYA$ which means READ one item from the DATA statements and SAY that item) and the NEXT command said go back and do it again until the LIMIT (5) is reached.

Line 40: The DATA contained here consits of 5 "words" which together make up the sentence you just programmed. The sentence the computer spoke was: "COMMODORE COMPUTER ARE TERRIFIC".

Remember that a plural word requires that you add four S's as a seperate word, immidiately after the word you want to pluralize.

Now type the word NEW and press the RETURN key to erase your previous program.

Here's another example which includes 7 utterances... type this as shown:

10 FORX = 1TO7(RETURN)
20 READA$(RETURN)
30 SAYA$:NEXT(RETURN)
40 DATAYOUR,COMMODORE,SIX,TY,FOUR,CAN,TALK(RETURN)

Type and RUN this program. (Note if your missed a comma or made another mistake, the computer will give you an ERROR message... LIST your program and retype the line which is wrong.) Here, the sentence reads: "Your Commodore 64 can talk." Did you notice that in LINE 40 we split the word SIXTY into two parts - SIX and TY? This is because our researchers were able to save more space for extra words in out vocabulary by using the "TY" and combining it with FOUR to make FORTY, FIF to make FIFTY, SIX to make SIXTY, SEVEN to make SEVENTY, and so on... otherwise we would need seperate words for all of these numbers and you would have fewer words for making sentences. The same applies to numbers in the "teens" -- for example, THIRTEEN becomes two seperate words: THIR and TEEN.

8. SAY and Spell

This little program will show you some general programming tips, as well as how to turn your computer into a SPELLING MACHINE. Type in this program:

10POKE53280,6:POKE53281,0:POKE646,7
20PRINTCHR$(147)TAB(240)
30PRINT"TYPE A WORD AND PRESS RETURN":INPUTX$
40FORY = 1TOLEN(X$)STEP1:SAYMID$(X$,y,1):NEXT
50GOTO10

Type the word RUN and press the RETURN key, then enter any word (no spaces or numbers) and press the RETURN key. Your COMMODORE 64 will automatically SPELL OUT LOUD the word you typed. The program keeps "looping back" to itself, which means it will keep asking you to type in a word... to get out of this loop hold down the RUN/STOP key and at the same time press the RESTORE key. You can always stop a program which is running in this way. The computer will clear itself, BUT YOUR PROGRAM IS STILL IN THE COMPUTER so if you RUN or LIST it, it's still there. Let's see how this program works:

LINE 10 includes 3 POKE commands which change the screen and border colors. POKE 53280 followed by a comma and a number from 0 to 15 will change the BORDER COLOR. POKE 53281 changes the SCREEN COLOR and POKE 646 changes the CHARACTER COLOR. So the first POKE changes the border to blue, the second POKE changes the inside screen to black and last POKE changes the character color to yellow. You can type these POKEs directly into the computer without writing a program. Try experimenting yourself with different color combinations!

LINE 20 clears the screen (PRINTCHR$(147) is the same as PRINT"CLR/HOME") and TABs 240 spaces from the upper left corner, which just happens to be 6 lines down on your screen - this is used to position the message.

LINE 30 PRINTs the message on the screen. The INPUTX$ command tell the computer to wait until you type in a word (letters only, no numbers or spaces) and automatically prints a question mark.

LINE 40 uses a FOR...NEXT loop. Remember we said that a FOR...NEXT loop causes all the actions between FOR and NEXT to be performed, up to the limit of the loop? Here, we stat by saying that the loop limits are from 1 (the first letter) up the the LENgth of the word you typed in. LEN(X$) means that length of the word you type in, which the computer has defined as "X$". So if you type a 9-letter work like "COMMODORE", the length of the word is 9 and the loop becomes: FORY = 1TO9. The next portion SAYMID$(X$,Y,1) tells the computer which letter to say. X$ is your word. Y is the position of the letter - it starts with position 1 and changes each time until the "loop" reaches the limit, which is 9, or the LENgth of our word. The number 1 can be considered as a "constant" for the purpose of this discussion.

LINE 50 uses a GOTO statement. This causes the computer to go back to the beginning of the program and start over again at LINE 10.

SAYing Numbers
The following example gives you a fairly simple way of telling the computer to SAY numbers generated in your program. It doesn't matter whether the numbers being generated come from a student entering the answer to a question, or are being used to repeat a number out loud for an accountant who doesn't have time to look up from a checklist during a calculation... whatever the use, it's helpful if the computer is able to speak all numbers up to 999,999,999.

5DIMB%(12)
10FORL=1TO9:READA$(L):NEXT:FORL=2TO9:READB$(L):NEXT:FORL=0TO9.READC$(L):NEXT
15FORL=1TO2:READD$(L):NEXT
20POKE53280,6:POKE53281,0:POKE646,7
25PRINTCHR$(147)TAB(240)
30PRINT"TYPE A NUMBER AND PRESS RETURN":INPUTZ
35IFZ>999999999THEN:SAY"TOO":SAY"LARGE":GOTO25
40IFZ<-999999999THEN:SAY"TOO":SAY"SMALL":GOTO25
45IFZ<0THEN:SAY"MINUS"
50IFZ=0THEN:SAY"ZERO":GOTO25
55D=0:Z$=STR$(Z):RATE(2)
60FORL=LEN(Z$)TO2STEP-1:B%(D)=VAL(MID$(Z$,L,1)):D=D+1:NEXT
65FORL=INT(D/3)TO0STEP-1:A=B%(L*3+2):B=B%(L*3+1):C=B%(L*3)
70IFA>0THEN:SAYA$(A):SAY"HUNDRED"
75IFB>1THEN:SAYB$(B):IFB$(B)<>"TWENTY"THEN:SAY"TY"
80IFB=1THEN:SAYC$(C):IFC>2THEN:SAY"TEEN"GOTO90
85IFC>0ANDB<>1THEN:SAYA$(C)
90IFA+B+C>0ANDL>0THEN:SAYD$(L)
95NEXT:RUN
100DATAONE,TWO,THREE,FOUR,FIVE,SIC,SEVEN,EIGHT,NINE
110DATATWENTY,THIR,FOUR,FIF,SIC,SEVEN,EIGHT,NINE
120DATATEN,ELEVEN,TWELVE,THIR,FOUR,FIF,SIX,SEVEN,EIGHT,NINE
130DATATHOUSAND,MILLION

READY

The RATE Command - Changing the Talking Speed

You can change the "rate" or speed at which utterances are said, by adding a special command called the RATE command. Here's an example:

10 RATE1:SAY"APOSTROPHE"
20 RATE4:SAY"APOSTROPHE"
30 RATE8:SAY"APOSTROPHE"
40 RATE10:SAY"APOSTROPHE"

Type RUN and press RETURN. Did you hear the difference in the rate each number was spoken? The computer talked slower each time. There are 10 RATE settings. RATE1 is the FASTEST speech and RATE 10 is the slowest. RATE4 is standard.

Here's a program that lets you vary the RATE of EACH WORD spoken in a sentence - the RATE settings in the DATA statements cause the utterances which FOLLOW to be spoken at that rate, until a different rate is specified. This is helpful in fine-tuning your programs to provide more natural sounding speech.

gets a word from DATA below
10PRINT"CHANGING RATE IN SENTENCE"
20GOSUB 5000
30PRINT"PRESS ANY KEY FOR ANOTHER PHRASE"
40GETA$:IFA$=""THENGOTO40
50GOSUB5000
60SAY"AGAIN":INPUT"AGAIN";A$
70IFLEFT$(A$,1)<>"Y"THENEND
80RESTORE:GOTO10
5000READSP$
5010IFSP$="."THENRETURNif the word is a period then RETURNs above
5020IFLEFT$(SP$,4)="RATE"THENREADSP:RATE(SP):GOTO500if word is "RATE" - then READ the next number to set RATE
5030SAYSP$say the word
5040GOTO5000do it again
5050DATATHE,COMMODORE,RATE,1,SIX,TY,FOUR,RATE,4
5060DATAIS,TERRIFIC,RATE,6,BECAUSE,RATE,3,NOW
5070DATAIT,RATE,2,CAN,RATE,4,TALK,.
5080DATARATE,5,THIS,RATE,3,IS,RATE,8,GOOD,.

Using The RDY Command

Because your COMMODORE 64 has the ability to generate speech simultaneously and independently of music and graphics, sometimes it becomes necessary to tell the computer to wait until speech is completed so that an animation, song or sound effect is properly timed in relation to speech.

Here's a quick example of how you might use the RDY command... first, type the word NEW and press RETURN to erase any previous programs, then type in this program... notice that spoken words and printed words aren't synchronized properly:

10 PRINT"THIS":SAY"THIS"
20 PRINT"WORD":SAY"WORK"
30 PRINT"IS":SAY"IS"
40 PRINT"BLUE":SAY"BLUE"

Now type the word NEW and press RETURN, then enter this program:

10 IFNOTRDYTHENGOTO10
15 PRINT"THIS":SAY"THIS"
20 IFNOTRDYTHENGOTO20
25 PRINT"WORD":SAY"WORK"
30 IFNOTRDYTHENGOTO30
35 PRINT"IS":SAY"IS"
40 IFNOTRDYTHENGOTO40
45 PRINT"BLUE":SAY"BLUE"

The RDY command tells the computer that is NOR READY (in other words, if the computer isn't finished speaking the last word), THEN GOTO the same line and keep going back until the word is finished. Only then does the program drop through to the next command. The RDY command if often used as a NOTRDY condition as shown here. It can be used in a similar way if you are programming simultaneous graphics and speech, graphics and music simultaneously, which means sometimes you will want the computer to wait until an utterance is completed before proceeding with a song, displaying a graphic symbol or PRINTing a message on the screen.

3. SUMMARY OF BASIC SPEECH COMMANDS
This section describes the Magic Voice program mode from the BASIC language. This feature gives users the ability to write their own games and applications using the Magic Voice preprogrammed vocabulary. Four new commands have been added to Commodore BASIC to make speech easy to use.

1. SAY Command

This command asks the Magic Voice to say a specific work from its preprogrammed vocabulary or additional vocabularies from diskettes, cassettes, and ROM cartidges. The Module accepts either the word number as a numeric expression with a value of 0,...,234; or a BASIC text string spelling out the word to be said. The distinction is made automatically by the module based on the type (string or numeric) of the argument it receives.

Examples:
SAY"HI"(Module says "HI")
B$="HI"
SAY B$(Module says "HI")
SAY 21(Module says word #21 in its vocabulary)
X=21
SAY X
SAY(3*7)

2. RATE Command

This command sets the rate or speed at which words and phrases are spoken. Ten speeds are available ranging from 0.65 times slower to 1.4 times faster than the standard rate. The fastest rate is #1, the standard rate is #4, and the slowest rate is #10. The RATE command must be passed a numeric argument.

Example:
FORI=1TO10
RATE(I):REM SET SPEED
SAY"HI":REM NOW LISTEN TO IT
NEXTI

3. VOC Command

This command alerts the speech module to the presence of an extended vocabulary loaded into system memory. This vocabulary might come from optional disks or cassettes. This command is only needed when additional vocabulary data has been loaded into memory. Look for upcoming additional vocabulary from your Commodore dealer.

Example:
LOAD"FISH.VOCAB",8,1
FISH=32768:REM ADDRESS OF VOCAB DATA
VOC(FISH).REM TELL SPEECH MODULE
SAY"SHARK".REM MODULE SAYS "SHARK"

4. RDY Command

This command is for use in many advanced applications. It is a logical funtion which return the value true if the Magic Voice is ready to accept another SAY command and false if not.

Example:
10 IF NOT RDY THEN 10
20 SAY"HI"
30 IF NOT RDY THEN 30
40 SAY"BYE"

This command can also be used by BASIC programs to detect the presence of a speech module in a system. The variable named "RDY" will be zero when a program is LOADed and RUN is a speech module is not present. If the module is present the value of "RDY" will be -1.

5. Error Condition

The Magic Voice detects and informs the user of certain kinds of errors that it detects. The most common of these occurs when the user tries to "SAY" a word that is not in the module's vocabulary. Thwn this happens, the module will flag an error to BASIC and the message "ILLEGAL QUANTITY ERROR" will appear on the screen.

The module's other functions (RATE & VOC) requite numeric arguments. These functions will return the "? TYPE MISMATCH ERROR" message if called with a non-numeric argument.

6. Discussion

The simple command set gives the user the ability to program simultaneous speech output, music, and graphics actions. You may have noticed if you tried any of these examples, that the BASIC READY message appears on the screen almost instantly - before the Magic Voice has finished saying what you asked it to say!

This is because the SAY command doens't actually do the work of generating the speech output. It merely initiates the process by asking the module to start saying a word. Once the SAY command is finished "asking" the module to get started, the module operates independently and execution of our BASIC program continues while the speech is being produced! This is how combined speech, music, and graphics is possible.

The RDY command is included in order for your program to determine what the module is doing at any time. As an example, your program might start with a SAY "HI" and then play a three note tune. If you wanted to play the tune after the word "HI" was finished, you would use the following king of program:

10 SAY"HI"
20 IF NOT RDY THEN 20
30 GOSUB 1000 : REM SUBROUTINE TO PLAY TUNE AT 1000

Several exciting examples of games that are created easily using these BASIC language commands and the pre-programmed vocabulary are included in this Commodore 64 Magic Voide User's Guide.

4. PROGRAMMING SPEECH IN ASSEMBLY LANGUAGE
The Commodore 64 Magic Voice includes a collection of linkage routines necessary to allow assembly language programs to operate the speech synthesizer. User programs can "say" any of the built-in words and phrases as well as their own specially prepared speech date.

The synthesized signal is brought into the SID chip as an external input and mixed with music generated by the SID. It is important to note that the SID master volume must be turned on in order to hear the synthesized speech. The Magic Voice initializes the SID chip to a volume setting of 15 on power-up. User programs that manipulate the SID volume setting should restore it to 15 before attempting to generate speech output since the built-in talk command software does NOT interact with the SID in any way.

The design philosophy of the assembly language interface is that user access to the speech module accurs via service calls from the user program. Code to handle these service calls is copied into RAM at $C000-$C3FF at system power-on. In addition, the core of the speech driver routines and the native vocabulary of the Magic Voice are copied into RAM underneath the BASIC and KERNAL ROMs.

IT IS VERY IMPORTANT NOT TO DISTURB RAM MEMORY LOCATIONS $A000-$A800 AND $E000-$FFFF for proper module operation. Programs which load their own speech data and do not rely on the built-in words and phrases of the module must only preserve $A000-$a800 and $C000-$3FF.

The assembly language interface consists of subroutine calls with the argument passed in the A and X registers.

There is a seperate subroutine for each of the following functions:

Detailed functional descriptions and calling specifications are provided below.

1. Assembly Language Calling Procedures

Upan pwer-up the speech module copies certain linkage code into memory locations $C000 to $C3ff and then enters a memory mapping mode appropriate to the demands of the cartridge. The cartridge program gains access to the module's programs by JSR'ing to the linkage programs which reside in that RAM area (which is active in all memory map modes).

Where possible, the calling procedures have been designed with ease of use in mind. Functions requiring a single byte except that byte in the processor's A-register. Where two bytes are needed the A-register and the X-register are both used. Only when a count is needed is the Y-register used. Registers are preserved only as indicated in the detailed descriptions below. The conventional uses of the registers are as follows:

A-register: complete operand or low byte if an adress is passed.
X-register: upper byte if an adress is passed
Y-register: count (0 implies 256).

2. Memory Requirements

Use of the speech module impacts the programmer's planning of memory utilization in several ways:

3. Assembly Routines

SRESET - Reset The Speech System/Stop Talking
ENTRY: $C003
ENTRY CONDITIONS: NONE
RETURNED INFORMATION: Accumulator is destroyed.

This command resets the synthesizer hardware. It should be included in applications programs for initialization purposes and may be used to stop speech output in mid-utterance.

SPSTAT - Get Status Of Speech Module
ENTRY: $C006
ENTRY CONDITIONS: NONE
RETURNED INFORMATION: ACC = 0 if ready / -1 if busy talking.

The N and Z bits of the processor status word are set accordingly. This command may be used to determine whether the speech module has completed previous "sayit" requests and whether a new "sayit" request can be handled immediately.

SAYIT - Say A Word
ENTRY: $C009
ENTRY CONDITIONS: Y-reg = most significant portion of the word number. A-ref = least significant portion.
RETURNED INFORMATION: All registers destroyed.

This command initiated the synthesis of a word or phrase. Control is returned to the calling program almost immediately if the module is not already talking, then control is not already talking. If the module is talking, then control will not be returned until the current request can be initiated. Words number 0 through 255 are words which are in the speech module. Words number 256 through 4095 are interpreted as located in the user's program space.

CAUTION: Special care should be taken to ensure that no other process in the system that generates NMI's is active when the calls to the speech synthsizer are made. This includes the RS-232 channel and the serial bus devices. The RS-232 channel is the only channel which must be actually be CLOSED. The serial bus channels may be open and may be left opened, but must not actively transmit data. It is recommended that programs which wish to perform series use I/O check, via SPSTAT to ensure that speech output is complete before initiating the operations.

SAYRAM - Say A Word From RAM
ENTRY: $C00C
ENTRY CONDITIONS: X-reg = most significant portion of the word number. A-reg = least significant portion.
RETURNED INFORMATION: All registers destroyed
This command is similar to the "SAYIT" except that the structure permitting access through the memory mapping system is bypassed. This entry point is intented to permit generation of speech from RAM based speech data. This may also be useful if RAM versions of words are modified under program control.

Speech is generated as in the SAYIT command above. Utterances 0...255 are taken from the on-board vocabulary and utterances 256..4095 are taken from memory as established by the SETTAB routine. No mapping is performed. Speech data is taken directly from the program's address space.

Note: See caution under SAYIT above.

SPEED - Set Speaking Speed Of Synthesizer
ENTRY: $C00F
ENTRY CONDITIONS: A-ref = desired speed code from 1...10.
RETURNED INFORMATION: No register affected.
The SPEED capability is used to speed up or slow down the speaking rate of the synthesizer. The range of speed variations is from .64X decrease in the speed (speed code = 10) to a 1.4X increase (speed code = 1) Normal speed is code 4.

SETTAB - Set Utterance Look Up Table Address
ENTRY: $C012 ENTRY CONDITION: A-reg = lower byte of adress. X-reg = upper byte of adress.
RETURNED INFORMATION: None.
The SETTAB function is used to tell the speech module the starting memory address of user supplied speech data. It is identical to the BASIC VOC command. This command MUST be employed prior to any attempts to generate speech with utterance numbers greater than 255.

SIGNAL - Enable Vectoring To Completion Code
ENTRY: $C015
ENTRY CONDITIONS: JMP instruction to completion code handling routine MUST be planted in memory locations $C018-$C01A
RETURNED INFORMATION: None.
This function is for support of advanced applications which implement asynchronous event driven programming techniques. The effect os the SIGNAL call is to increment a counting semaphore maintained by the talking process. This semaphore is waited on by the speech completion, which when signalled, will jump tothe completion code vector address ($C018). Users should plant a JMP intruction in the three bytes of memory starting at this address. ONLY $C018-$C01A SHOULD BE CHANGED.

This JMP instuction should point into user code which handles the completion of the speeech output event. The user completion routine MUST terminate with and RTS instruction. Completion code handlers may be used for a variety of purposes but, in general, should be kept short since IRQ's are disabled and NMI's are ignored during this time.

NOTE: This facility also provides a means for user programs to detect the presence or absence of a speech module: a power-up footprint. The completor code vector area ($C018-$C01A) is initialized on power-up to the instruction sequence:
$C018 NOP
$C019 NOP
$C01A RTS

These instructions correspond to the values $EA, $EA, $60. User programs may detect the presence of a module by verifying that these locations contain the given values.

5. APPENDIX
1. Resident Vocabulary
The Magic Voice contains a built-in vocabulary of 235 utterances in a female voice. The utterances are numbers 0 to 234. The following is a numerical listing of the utterance contained in the Commodore 64 Magic Voice.

0ZERO
1ONE
2TWO
3THREE
4FOUR
5FIVE
6SIX
7SEVEN
8EIGHT
9NINE
10TEN
11ELEVEN
12TWELVE
13THIR
14FIF
15TWENTY
16HUNDRED
17THOUSAND
18MILLION
19TEEN
20TY
21A
22B
23C
24D
25E
26F
27G
28H
29I
30J
31K
32L
33M
34N
35O
36P
37Q
38R
39S
40T
41U
42V
43W
44X
45Y
46Z
47(SILENCE)
48ADD
49SUBTRACT
50DIVIDE
51DIVIDED
52EQUALS
53LESS
54MINUS
55MORE
56NUMBER
57PLUS
58REMAINDER
59IT
60AT
61WHEN
62HAS
63TIMES
64APOSTROPHE
65WORD
66ER
67EST
68ING
69SSSS
70TH
71ALL
72ME
73MY
74THAT
75THEIR
76THEY'RE
77THIS
78WHAT
79WHICH
80WHO
81YOUR
82YOU'RE
83ANSWER
84COMMODORE
85END
86POINT
87THING
88QUESTION
89TURN
90AM
91ARE
92BE
93BUY
94CAN
95CORRECT
96DID
97DO
98DOES
99DONE
100FIND
101GET
102HAVE
103HEAR
104HELP
105IS
106KNOW
107LIKE
108PRESENTS
109READ
110SAY
111SEE
112START
113USE
114WAIT
115WANT
116WAS
117WON
118WRITE
119HERE
120HIGH
121HOW
122THERE
123TOO
124WHERE
125WHY
126UH
127AN
128AND
129AS
130BUT
131BY
132FOR
133FROM
134IF
135IN
136LARGE
137NEXT
138NOT
129OF
140OFF
141OH
142ON
143OR
144READY
145SAME
146THAN
147THE
148THUH
149THEN
150TO
151WITH
152VERY
153BYTE
154HI
155PLEASE
156THANK
157YES
158BAD
159GOOD
160SORRY
161WRONG
162AFTER
163MOST
164BECAUSE
165NO
166OUT
167SEND
168TALK
169ANY
170EACH
171ENTER
172ERROR
173MANY
174EVERY
175AGAIN
176NOW
177SMALL
178TERRIFIC
179TRY
180LETTER
181FIRST
182SECOND
183THIRD
184COLOR
185BLACK
186WHITE
187RED
188CYAN
189PURPLE
190GREEN
191BLUE
192YELLOW
193ORANGE
194BROWN
195GREY
196LIGHT
197HE
198OUR
199SHE
200WE
201YOU
202COME
203GIVE
204PUT
205SET
206TAKE
207WERE
208UNTIL
209MAY
210OVER
211DARK
212COMMAND
213COMPUTER
214CONTROL
215CURSOR
216DISK
217DOWN
218GAME
219KEY
220LEFT
221LOAD
222NAME
223PLAY
224PRESS
225PROGRAM
226RIGHT
227RUN
228SAVE
229STOP
230SYMBOL
231TAPE
232UP
233WEIGHT
234HOUR

2. Alphabetical List Of Words
A21
ADD48
AFTER162
AGAIN175
ALL71
AM90
AN127
AND128
ANSWER83
ANY169
APOSTROPHE64
ARE91
AS129
AT60
B22
BAD158
BE92
BECAUSE164
BLACK185
BLUE191
BROWN194
BUT130
BUY93
BY131
BYE153
C23
CAN94
COLOR184
COME202
COMMAND212
COMMODORE84
COMPUTER213
CONTROL214
CORRECT95
CURSOR215
CYAN188
D24
DARK211
DID96
DISK216
DIVIDE50
DIVIDED51
DO97
DOES98
DONE99
DOWN217
E25
EACH170
EIGHT8
ELEVEN11
END85
ENTER171
EQUALS52
ER66
ERROR172
EST67
EVERY174
F26
FIF14
FIND100
FIRST181
FIVE5
FOR132
FOUR4
FROM133
G27
GAME218
GET101
GIVE203
GOOD159
GREEN190
GREY195
H28
HAS62
HAVE102
HE197
HEAR103
HELP104
HERE119
HI154
HIGH120
HOUR234
HOW121
HUNDRED16
I29
IF134
IN135
ING68
IS106
IT59
J30
K31
KEY219
KNOW106
L32
LARGE136
LEFT220
LESS53
LETTER180
LIGHT196
LIKE107
LOAD221
M33
MANY173
MAY209
ME72
MILLION18
MINUS54
MORE55
MOST163
MY73
N34
NAME222
NEXT137
NINE9
NO165
NOT138
NOW176
NUMBER56
O35
OF139
OFF140
OH141
ON142
ONE1
OR143
ORANGE193
OUR198
OUT166
OVER210
P36
PLAY223
PLEASE155
PLUS57
POINT86
PRESENTS108
PRESS224
PROGRAM225
PURPLE189
PUT204
Q37
QUESTION88
R38
READ109
READY144
RED187
REMAINDER58
RIGHT226
RUN227
S39
SAME145
SAVE228
SAY110
SECOND182
SEE111
SEND167
SET205
SEVEN7
SHE199
(SILENCE)47
SIX6
SMALL177
SORRY160
SSSS69
START112
STOP229
SUBTRACT49
SYMBOL230
T40
TAKE206
TALK168
TAPE231
TEEN19
TEN10
TERRIFIC178
TH70
THAN146
THANK156
THAT74
THE147
THEIR75
THEN149
THERE122
THEY'RE76
THING87
THIR13
THIRD183
THIS77
THOUSAND17
THREE3
THUH148
TIMES63
TO150
TOO123
TRY179
TURN89
TWELVE12
TWENTY15
TWO2
TY20
U41
UH126
UNTIL208
UP232
USE113
V42
VERY152
W43
WAIT114
WANT115
WAS116
WE200
WEIGHT233
WERE207
WHAT78
WHEN61
WHERE124
WHICH79
WHITE186
WHO80
WHY125
WITH151
WON117
WORD65
WRITE118
WRONG161
X44
Y45
YELLOW192
YES157
YOU'RE201
YOU82
YOUR81
Z46
ZERO0

6. MAGIC VOICE USER'S GUIDE ERRATA SHEET
This information replaces certain sections in your Magic Voice User's Guide.

1. The following paragraph concerning the RDY command on page 15 will not work as described and should be ignored by the user:
This command can also be used by BASIC programs to detect the presence of a speech module in a system. The variable named "RDY" will be zero when a program is LOADed and RUN if a speech module is not present. If the module is present the value of "RDY" will be -1.

A correct way to detect the presence of MAGIC VOICE while using a BASIC program is as follows. A description of this method is found on page 21 for assembly language programmers.

10 IF PEEK(49176)<> 234 THEN GOTO 60:REM CHECK IF MODULE PRESENT
20 IF PEEK(49177)<> 234 THEN GOTO 60
30 IF PEEK(49178)<> 96 THEN GOTO 50
40 SAY1:SAY2:SAY3:REM PUT CODE THAT USES MODULE HERE
50 GOTO 50
60 PRINT"YOU FORGOT YOUR MAGIC VOICE":REM PUT "NO MODULE" CODE HERE
70 END

2. We greatly appreciate end-user feedback concerning our products and supporting documentation. Please forward your comments to:

Documentation Support Group
Software Division
Commodore Business Machines, Inc.
West Chester, PA 19380

C= commodore
COMPUTERS

Commodore Business Machines, Inc.
1200 Wilson Drive * West Chester, PA 19380

Commodore Business Machines, Limited
3370 Pharmacy Avenue * Agincourt, Ontario, M1W 2K4


html version 1.0
document converted from printed to html format by
doj / cubic
I have tried to type this manual exactly as in the original documentation including all errors... However it is possible that I included some typos too, so please be patient with errors you encounter. Although I must note that there are plenty of errors in the manual I had.

Home / C64 - Magic Voice Cartridge