[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New csa2 FAQs: F002s4SOUND (Part 1 of 2)
Apple II Sound Manual IV: Echo Speech Synthesizer Mini-Manual
Csa2 FAQs-on-Ground file: Fxxxs4Sound.txt
This material compiled by the Ground Apple II site, 1997.
It may be freely distributed.
Note: This is a pure Text file which has no Font, Color, etc.
formatting. To correctly view tables and diagrams on a super-res
display, use a mono-spaced Font such as CoPilot or PCMononspaced.
____________________________
ECHO ][ SPEECH SYNTHESIZER MINI-MANUAL
TABLE OF CONTENTS
______________________________________________________________________
INTRODUCTION
INSTALLATION
SPEECH GENERATOR
SPEAKING FROM WITHIN AN APPLESOFT PROGRAM
WORD STRUCTURE
SPEECH EDITOR
SPEECH EDITOR COMMANDS
PHRASE CONSTRUCTION
SAMPLE VOCABULARY
SAMPLE PROGRAM
HANGUPS?
SPEECH EDITOR EXAMPLE
PROGRAM EXAMPLE
TABLES
APPENDIX - SAMPLE VOCABULARY
INTRODUCTION
Until recently, speech generation by a micro-computer required a
fair amount of memory storage and hardware. With the advent of "Linear
Predictive Coding" (a mathematical method of simulating the human vocal
tract) the amount of memory needed to store speech was greatly reduced.
Instead of storing the actual speech signal, only those LPC parameters
needed to describe each particular speech sound are stored. This allows
programs to have a large resident vocabulary without having to access a
disk or tape every time an alternate response is needed. As an
illustration, the sample vocabulary supplied with the ECHO ][ contains
all of the letters of the alphabet, numbers, and over 100 other words in
less than 2K of memory.
The heart of the ECHO ][ is Texas Instrument's TMS 5200 speech
processor. This integrated circuit is an upgraded version of the one
used in the Speak & Spell (TM of Texas Instruments) that has been
modified for use with an eight bit processor. The ECHO ][ has been
designed so that all of the features of the TMS 5200 may be used with
the APPLE, however only RAM based speech is used with the initial
operating system. Empty sockets have been provided for standard
vocabulary ROMs when they become available.
The initial operating system is a RAM based phoneme system that was
designed to provide flexibility and a further increase in memory
efficiency over straight encoded words. By using the SPEECH EDITOR the
user may create any word or phrase that he desires to have spoken from a
program. This code is in a compact form and contains information on the
sound, pitch, and duration of each phoneme. A second program called
SPEECH GENERATOR is a binary program which interprets this code and
passes the correct parameters to the ECHO ][ to speak the word. Only the
SPEECH GENERATOR (1K bytes) and the actual vocabulary (10 to 20
bytes/word) are needed for a program to speak.
The address of the word to be spoken is "poked" to the SPEECH
GENERATOR and a call is made to initiate the speech. The sections which
follow discuss in detail how to install the card and the different
components of the software system and how they are implemented.
Following that is a step by step example of how to use the speech editor
to create words and then a short program of how to access them from
APPLESOPT basic. It is suggested that you read over the next sections
first and then work through the example to become familiar with the
system. You may also want to list the sample programs (RECITE and
TALKING TYPEWRITER) or examine portions of the sample vocabulary with
the SPEECH EDITOR as further examples.
INSTALLATION
Before installing the ECHO ][ be sure all power is disconnected
from the computer. The ECHO ][ card may be plugged into any of slots 2
thru 5 of the APPLE ][. The speaker cord should be attached to the
terminals on the back of the speaker and then plugged into the jack on
the back of the ECHO ][ card. Replace the cover and the installation is
complete. There is a short subroutine located within the SPEECH
GENERATOR which will determine which slot the ECHO ][ is located in.
This should be "called" at the start of a program before any speech is
attempted and will be discussed in the next section.
The SPEECH EDITOR disk is a 13 sector disk copied using DOS 3.2.1
and will not run on a DOS 3.3 system without first using the BOOT13
utility, It is suggested that a backup disk be made as soon as
possible to protect its contents. If you have DOS 3.3 you may "muffin"
it at this time.
SPEECH GENERATOR
The SPEECH GENERATOR is a 1K binary module that contains the actual
phoneme codes, routines for processing these codes along with their
variables (pitch, length, and volume), and the routine for locating the
ECHO ][ slot. If you "catalog" the supplied disk, you will see four
different versions of the SPEECH GENERATOR. Each version resident in
a different portion of memory to accommodate the HIRES pages and
different size systems. The locations of these routines and their
associated entry points are listed in TABLE 1 at the end of the manual.
The Speak routine takes the compressed speech data beginning at the
starting address (specified by the "calling" program), processes it,
and then outputs it to the ECHO ][ for speaking. It will keep
processing successive bytes of information until is comes actor's an
"end" command ( HEX "AC" ) which is tacked onto the end of each word by
the SPEECH EDITOR. At that point speech is terminated and control is
returned to the main program.
The SETSLT routine actually "looks" for the ECHO ][ card and then
modifies the Speak routine accordingly. This routine should be called
at the start of any speech program since different programs may be
using different locations for the SPEECH GENERATOR. If your card is
installed in slot 5 you don't really need to use the SETSLT routine,
however if you change the location of the ECHO ][ card the program will
not function properly.
The SETSLT routine is also useful for determining whether there is
an ECHO ][ card installed in the system. That way a program where
speech is an enhancement but not a necessity may still be run without
the speech. To do this a "PEEK" needs to be made to the location
called "SLOT" (see Table 1). If the SETSLT routine cannot find an ECHO
][ card it will set this location to 16 (10 Hex). An example is listed
below:
10 LOBYTE = 16384: HYBYTE = 16385: SPEAK = 16386: NXTSPK = 16398:
SLOT =16413: SETSLT = 17313
20 ECHO = 1: CALL SETSLT: X = PEEK (SLOT): IF X = 16 THEN ECHO =0
In the above listing a flag labeled "ECHO" was set to one if a
speech card was present or zero if there wasn't. This may be used
later in the program to bypass speech routines which could cause the
program to "hang" if no card was being used.
SPEAKING FRON WITHIN AN APPLESOFT PROGRAM
In order for the SPEECH GENERATOR to say a word, it has to know the
starting address of the word. Since BASIC deals with decimal numbers
and the SPEECH GENERATOR deals with binary numbers, the address will
have to be split into two portions and then poked to the SPEECH
GENERATOR with two separate pokes. For convenience the addresses for
these pokes have been labeled "HIBYTE" and "LOBYTE" and are listed in
TABLE 1. A short routine to accomplish this is shown below: 100 AH
= INT (ADD / 256) : AL = ADD - AH * 256 110 POKE HIBYTE, AH : POKE
LOBYTE, AL Once that has been accomplished a call to the SPEAK
routine will cause the word to be spoken. From a binary program the
same thing may be accomplished with two STA instructions followed by a
JSR.
WORD STRUCTURE
Words may be broken up into separate and distinct sounds or
phonemes. The ECHO ][ SPEECH EDITOR uses a set of forty-one possible
phonemes along with two different types of pauses and a stop command
(automatically appended at the end of words]. In general, voiced
sounds (see Table 2) have variable pitch, duration, and volume.
Unvoiced sounds (see Table 3) have these variables preset. There
are sixteen different pitch levels available for voiced sounds. these
range from one (highest) to sixteen (lowest). Varying the pitch allows
the computer to ask questions or make exclamations. If the pitch is all
one level, the speech will have a monotonic or robotic sound.
The length of each voiced sound may be specified as being from one
to eight 25 millisecond "frames" long. Unvoiced sounds are preset to be
anywhere from two to five frames long depending on the sound. The
"PA1" is the exception. This stops speech activity 25 to 200
milliseconds specified in 25 millisecond increments. The primary use of
the "PA1" is between words within a phrase or before stop plosives
("8","K","T",etc.). THE "PA" pause gives a delay of 25 milliseconds
however there is still some sound occurring during this period although
it is faint. There are eight available volume levels ranging from
one(softest) to eight loudest. The usual range is from five to eight
for vowel sounds except when tapering off at the end of some words.
Many commonly used sounds are made up of a combination of phonemes.
An example is the sound "oh". To produce this sound an "01" sound must
be followed by an "02" sound. Some other examples are "eye"
("AH","I","E") and "oooh" ("U1","U2").
SPEECH EDITOR
The SPEECH EDITOR is an APPLESOFT program which allows you to
construct custom words and phrases for the ECHO ][. Basically, it
arranges the sounds according to line numbers. These lines may be added
to, deleted, modified, and inserted as necessary during word
construction. When the word is finished it may be "saved" to RAM which
also will assemble it into the format the SPEECH GENERATOR requires.