CHEEp TAlk TYpE 'N' TAlk
LOUiS MARCOTTE, AC CONTRibUTiNG AUTHOR
Lee Brilliant's "Cheep Talk"
In the April 1985 issue of ANALOG Computing magazine, Dr. Lee Brilliant presented plans for an inexpensive speech synthesizer called "Cheep Talk" that could be connected to any 8-bit Atari computer through the joystick ports. I immediately rushed to the nearest Radio Shack store to purchase the parts and set to work with my soldering iron. Upon completion, I plugged it into my 130XE and ran the test program included with the article. I was pleasantly surprised to find it worked on the first try, and the speech quality was pretty good.
Type 'n' Talk: the T: Driver
Dr. Brilliant had described how to manually convert English phrases into elements of speech called allophones that can be sent to Cheep Talk using a simple BASIC program to produce speech. This approach produces excellent results but is tedious and time-consuming, requiring all speech to be hardcoded within the program.
A more versatile approach is to have the computer translate text into speech allophones in real time, allowing any English sentence to be spoken. Cheep Talk Type 'n Talk uses a custom text-to-speech conversion algorithm to provide an unlimited vocabulary and an easy to use interface for Dr. Brilliant's speech synthesizer. A general purpose Cheep Talk device driver, T:, is also provided which allows easy access to the text-to-speech conversion process from programming languages such as BASIC or assembly language, or from a Disk Operating System (DOS).
Getting Started
Cheep Talk Type 'n' Talk and the T: device driver are written entirely in machine-language and will appear on AC's June, 1993 Software Disk as the following files:
Cheep Talk Type 'n Talk TYPETALK.COM
T: Device Driver T.COM
The above files are also available from the online services (GEnie, CompuServe) in ARC'ed form.
Connect the speech synthesizer unit to joystick ports one and two, and load either TYPETALK. COM or T.COM using the Binary Load option of your DOS.
Using the Programs
The heart of these programs is a custom text-to-speech conversion algorithm which regulates all speech activity. All ASCII text directed to this algorithm is converted to speech output.
Cheep Talk Type 'n Talk accepts English text sentences from the keyboard and outputs them to the speech synthesizer via the text-to-speech conversion process. Just type a sentence at the prompt, press RETURN, and the sentence will be spoken. Full screen editing is supported, allowing previous sentences to be re-spoken simply by re-positioning the cursor anywhere within the desired sentence and pressing the RETURN key. Sentences can also be re-edited and spoken in a similar manner. Non-alphabetic characters are ignored, except for the comma, space, or period characters, which produce appropriate pauses when used between words or sentences.
The T: device driver is loaded into memory when the T.COM file is executed. This file can be renamed AUTORUN.SYS so the driver will be loaded upon bootup. The T: device is protected from system RESETs and will remain installed until the computer is turned off. Programming the T: device is done using the Central I/O (CIO) systemm, either from assembly language or a high order language (HOL) such as BASIC.
The following example in BASIC that will open a channel to the T: device, send a test message to be spoken by the speech snythesizer, and then close the T: device channel.
10 CLOSE #1
20 OPEN #1,0,0,"T:"
30 PRINT #1,"TESTING TESTING TESTING"
40 CLOSE #1
I recommend you only use channels 1 through 7 since channel 0 is used by the operating system for the screen editor (I used channel 1 in this example). A similar approach can be used for other HOLs or assembly language.
Speech Quality
Since a speech algorithm is used to translate English phrases into speech output, any word or combination of letters can be spoken, even if the phrase is gibberish. This provides an unlimited vocabulary. However, the quality of the spoken words is not as good as if a speech dictionary were used. I've optimized the algorithm so that most commonly used words are understandable. The English language is very complex, however, and the program will occasionally mis-pronounce words. In these cases, intentional mis-spelling of the word will almost always produce the correct pronunciation. For example, it's impossible for the program to distinguish between a word that's spelled the same but pronounced differently, such as the word 'read' in the following sentences:
I have read this article.
I will read this article.
Using 'red' instead of 'read' in the first sentence will produce the desired results, though perfectionists might find this annoying. Similarly, words such as 'lose' can be spelled 'looz' to achieve the desired pronunciation.
Applications
Applications for the T: device driver are limited only by your imagination. Possible applications are burglar alarm systems, home control systems, games, educational software or wherever controllable synthesized speech output is desired.
Cheep Talk Type 'n Talk can be used to quickly prototype speech text to be inserted into a program that uses the T: device. Its editing facilities allow you to modify text until the desired pronunciation is obtained. Or you can simply use it to amaze your friends with your talking Atari!
Programming Note
Cheep Talk Type 'n Talk was developed using the Six Forks Assembler/Linker package from Six Forks Software. This linker-based assembler facilitates the design and development of complex software by allowing the code to be broken down into functional units. Each unit has a single function that's easily designed, coded and tested. The units can then be integrated together in order of increasing complexity until the entire program is functional. This drastically reduces program development time and results in code that's easy to understand and maintain.
Conclusion
I hope many uses are found for this nifty Atari 8-bit capability. If you haven't already built the speech synthesizer, this is a good reason to do so. Get issue #29 of ANALOG Computing and follow the directions in the article. If you aren't electronically oriented, perhaps you can ask a friend who is to help. One possible problem will be finding the SPO256-AL2 speech synthesizer chip, since Radio Shack no longer sells them. You may have to hunt around other electronic supply sources to find it, or you may have to purchase a used Cheep Talk device. Good luck!
If you have comments about the programs or would like to describe your use of the programs, please drop me a line care of Atari Classics magazine. I hope you have as much fun using these programs as I had writing them.
About the author:
Lou Marcotte is a Senior Design and Development Engineer at Raytheon Company, where he develops software to control military and civilian radar systems. This is his first published article.
Editors's Comments. Finding the SPO256 AL2 chip will indeed be a problem. I looked through my pile of electronic component catalogs and finally located the chip in the 1991 Active Electronics catalog for $9.95. That was the most recent edition I have; however Lou indicates it is still listed for the same price in in a more recent edition of the Active catalog. Active is located at 11 Cummings Park, Woburn, MA 01801 USA, phone 617-932-4616.
I built the Cheep Talk speech module myself but hadn't used it for quite a while; like Lou, I found programming the individual phonemes with BASIC too exhausting. The Type n' Talk programs are a major improvement over Lee Brilliant's original software, in that you get a fast aural feedback. Aural memory fades rather quickly, and allophone programming takes so long you forget what the previous "take "sounded like while you're working on the next improvement.
In trying out the programs I found a few nits to pick. I found myself wishing an XEP-80 driver bad been included, just so I could keep more text on the screen to prevent my repeating pronunciation trials. The algorithm Lou used could stand some improvement. The T: driver handles consonants pretty well, but it gets confused on vowels and vowel combinations. I tried a few tonguetwisters on it for fun. "Peter Piper picked a peck of pickled peppers" had to be typed as "PEETER PI PER PICKED A PECK OF PICKED PEPPERS". When spelled correctly, Peter Piper came out sounding like "Petter Pipper" I also tried "How much wood would a woodchuck chuck if a woodchuck could chuck wood?", and that one took some effort. Eventually I found that "HAWO MUCH WIOD WIOD A WIODCHUCK CHUCK IF A WIODCHUCK KIOD CHUCK WIOD?" sounded more normal on the Cheep Talk. There's a problem with long "o"sounds; "mud" comes out sounding like "mood".
Even so, it would have taken me hours or days to get Cheep Talk to pronounce these sentences with phoneme programming. After awhile l began to get the hang of it, but only after I started making some very weird sounds of my own, listening to them, then trying to develop a phonetic spelling. I'd liken the experience to teaching a speech-disabled child how to talk by listening to the sound of your own speech. It's a faculty we take for granted; I found the experience enlightening. - BLP