SPEECH SYSTEM 3
from Your Sinclair #8 (Aug.1986)

SPEECH MELBA

Are you speechless? Does your computer just bleep like a
microwave or does it talk back to you? Does it saute you
with soliloquies ... or does it just go ffffffrrrrrrppppp
like a Magimix? Don't eat your Speccy in disgust, for Master
Chef Andrew Toone has a recipe for success.


Getting computers to talk has been an obsession with
computer folk since the birth of computers themselves.
Recently computer speech has become quite common, and an
enormous number of speech synthesisers are finding their way
into everyone's larder. But what can you do in the way of
speech if you can't cook up the necessary dough for a speech
synth? Well, let's get digital!

Imagine the Speccy's memory as a 48cm (instead of K) length
of digital audio tape. Speech Melba reads in a sound at the
ear port, and converts each frequency it hears into digits
and places them sequentially in memory, one after the other.
Just as a piece of audio tape converts sounds into magnetic
patterns on its surface. This digital recording technique is
the basis of 'sound sampling', the current darling of the
music world. Fairlight CMI computer synthesisers use
sampling ... yeah, okay, so the bandwidth is a little higher
(ahem) so the sound quality is better, but the principle is
the same.

The recording quality on the naked Spectrum isn't brilliant,
but don't judge it on the strength of what you hear on your
beeping piezo speaker - boost it through a proprietary
speaker or through your stereo, and then you'll hear what
can be done. Anyway, what do you want for a short Basic
program and a little chunk of code? A Number One Hit Record?


What You Do

First lay out all your ingredients on a clean work surface.
Type in the first listing from this copy of YS into your
Speccy. This is the Main Program, and it controls all the
functions of the Melba. Save it to tape with the command
SAVE "sayprog" LINE 9000. The essential filling for the main
Melba is in listing two. Run it through a piping hot hex
loader and conserve the Juices as SAVE "Earsay" CODE
65100,200. [There were 208 bytes in the hex dump listed in
the mag. JG.] (Slurp!) Mmmmm, lovely. Now you've
incorporated all the ingredients, take the soup, heat it up
on the heat sink of a 128, and sprinkle lightly with
parsley. Serve in a bowl and eat it while you Load Speech
Melba. When the program has loaded, and you've finished your
soup, you 're faced with the main menu.


Starters

O and P Set speed of sound to be played or recorded.
Q and W Coarse edit length of sound to cut off unwanted noise at end.
R       Records sound heard at Ear socket (at current speed)
T       Plays the recorded sound at different pitches from the keyboard
1 to 9  In Play mode allows the nine 'notes' to be tuned with O and P
Q       Returns to menu in Play mode
E       Edit mode to adjust speed of sound and monitor it
G       Draws a graph of the current sound
S       Saves the sound
X       Exits the Speech Melba and pops into a warm Basic at Mark 5


Serving Suggestion

What a range of tempting ways you can serve your Speech
Melba ... Why the list is as long as your serving spoon! As
an addition to games, speech makes even the simplest seem
hi-tech. And utilities too! Speaking computer programs would
be easier to use by a blind person, wouldn't they?

Aside from these more obvious applications, the techniques
employed in this program can be studied and used as the
basis of a real sound sampling program. If you have a little
knowledge of hardware, you could add a RAM pack to the
Speccy's memory, and increase the amount of sound you can
fit in it and the quality of the reproduction. You could end
up designing the next Fairlight! (They cost #30,000, and
that buys a lot of peaches.)


--
Another Fine Product transcribed by:
Jim Grimwood (jimg@globalnet.co.uk), Weardale, England
--
