About Talking Computer
How did a home computer of the early 1980s talk, with a few kilobytes of memory and no recordings of anyone's voice? In two steps. First, rules turn the spelling into speech sounds (phonemes). Then a small synthesiser makes each sound from scratch: a buzz for the voice, a hiss for the noisy sounds, and a few filters that shape them the way your mouth and throat do. This page is a working talking computer built that way, with everything on show.
SAY IT: type a sentence. The rules turn it into phonemes at once (the card lists them); you can also edit the phonemes yourself, and 1 after a vowel marks the beat of a word. The screen shows the sound it will make: the waveform and a spectrogram, where time runs left to right, pitch goes up and darker green is quieter. The bright bands are the formants. SAY IT plays it with a marker that reads along; if sound is blocked on your computer the marker still runs. Pitch, speed and voice (natural tune, a flat monotone, a harsh robot buzz or a whisper with no buzz at all) change the picture straight away. The card shows how many bytes the rules, the sound table and the synthesiser take.
HOW IT WORKS: the source-filter idea. Drag the point on the vowel chart (first formant down the side, second across) and see the three pictures: the source (a buzz has a line for each harmonic of the pitch; a hiss is flat), the filter the formants make, and the two multiplied, which is what comes out. The dots are Peterson and Barney's ten vowels from 1952. PLAY VOWEL plays it; it also plays when you let go, unless you untick that.
THE RULES: step through the letter-to-sound rules for any text, one match at a time. Each rule reads left[letters]right=sounds: the letters in brackets make those sounds when the letters on each side fit. The rules for a letter are tried in order and the first that fits wins; the page shows which were passed over and why. The card lists words where English spelling beats any simple rule.
VODER: a version of the 1939 Voder, which made speech with no rules at all: an operator played it. Ten keys open ten band filters; the wrist bar picks buzz or hiss; the pedal sets the pitch; three keys make the pops of P, T and K. On a keyboard use A S D F G H J K L ; for the bands, hold Shift for hiss, Z X C for the pops, and ↑ ↓ for pitch. The picture shows the sound's spectrum as you play, so it teaches even with the sound off.
THE STORY
Homer Dudley at Bell Telephone Laboratories built the vocoder in the 1930s: it measured how much of a voice fell in each of ten frequency bands, sent just those levels, and rebuilt the voice at the other end from a buzz or hiss. The Voder was its rebuilding half, played by hand. It was shown at the 1939 New York World's Fair, played by women operators who had trained for about a year. In the Second World War the vocoder idea carried the secret telephone calls of the SIGSALY system between Washington and London.
In 1952 Gordon Peterson and Harold Barney, also at Bell Labs, measured the formants of ten English vowels said in words like heed, hid and head by 76 people (33 men, 28 women and 15 children). Their men's averages are the vowels on this page. In the 1950s Walter Lawrence in Edinburgh (PAT) and Gunnar Fant in Stockholm (OVE) built synthesisers driven by formants, and in 1961 an IBM 7094 at Bell Labs sang Daisy Bell.
In 1976 H. S. Elovitz and colleagues at the US Naval Research Laboratory published a set of letter-to-sound rules for English written in the bracket form this page uses. Rules of that kind and a small table of sounds let several programs for 8-bit home computers in the early 1980s talk in a few kilobytes. Texas Instruments' Speak & Spell (1978) talked a different way, playing back speech squeezed by linear prediction from a chip.
Dennis Klatt at MIT described a formant synthesiser in 1980 ("Software for a cascade/parallel formant synthesizer"), with the resonator this page uses. His work led to DECtalk, sold by Digital Equipment Corporation from 1984.
HOW IT WORKS
The rules. Each word is read left to right. For the letter under the reading point the page tries that letter's rules in order; the first whose letters and both contexts fit gives its sounds, and the reading point jumps past the matched letters. A context can be plain letters, or symbols: # one or more vowels, : any number of consonants, ^ one consonant, + E, I or Y, % an ending such as E, ES, ED or ING, and so on (the RULES tab lists them all). Every letter ends with a plain rule with no context, so nothing is ever skipped. The 260 or so rules here are this page's own, written for it; they guess the beat of each word separately (the first vowel, or the second after starts like be, re and com), and numbers are read out as words first (years like 1984 in pairs, 3rd as third, 3.14 as three point one four, £5.50 as five pounds fifty), as are the titles Mr, Mrs and Dr.
The sounds. Each phoneme has a length and three formant frequencies. The vowels use Peterson and Barney's figures; the consonants have the frequencies the formants point to as the mouth closes (lips, tongue tip or back of the tongue), and the hissing sounds have a filter centre of their own (high for S, lower for SH, broad and weak for F and TH). A stop such as P is a short silence, a click of noise and, before a vowel, a puff of breath. Between sounds the formants slide in straight lines, which is a rough copy of how the mouth moves.
The synthesiser. The voice is a train of pulses at the pitch, each shaped like the air flow when the vocal folds open and snap shut. It runs through five resonators in a row (a cascade): F1, F2 and F3 from the sound table, and fixed ones at 3,500 and 4,500 Hz. Each resonator is one line of sums per sample, y = A·x + B·y1 + C·y2, with A, B and C worked out from the formant's frequency and bandwidth, as in Klatt's paper. A first difference at the end stands for the sound spreading out from the lips, which lifts the high frequencies. Noise for S and the like goes through a separate band-pass filter and is added on. The settings change every 5 ms and the sound is made at 16,000 samples a second, then played from memory. The tune of the voice drifts down through each phrase, lifts on stressed vowels, falls at a full stop and rises at a question mark.
The Voder here is ten band filters in your browser, with a buzz and a hiss to feed them. The band edges are this page's choice; the real Voder's ten filters also covered the range of speech.
WHAT IT LEAVES OUT
The rules are a small set and get many words wrong, as all rule sets do without a dictionary of exceptions; the vowels are American-style, as the old rule sets were. There is one male voice, no nasal anti-resonances (so M and N are just quiet low hums), no parallel branch of filters for consonants, and the timing and tune are simple. Size figures are of this page's own JavaScript, measured in the page; programs of the 1980s were written in machine code and packed far tighter.
FURTHER WATCHING AND READING