THE VIRTUAL TO2026 / EXTENSIONS / EXT 26-101

The speech synthesiser.

The EXT 26-101 module carries the MEA8000 chip, the one of the Thomson speech synthesiser, rebuilt from the Philips documentation: a sound source goes through four resonators set by 4-byte frames. The TO2026 adds French reading on top: SPEAK "Bonjour" is enough.

TO2026 · EXT 26-101SPEECHMEA8000 · 8 kHzSwitch the power offbefore plugging in.MEA8000
Reference
TO2026 · EXT 26-101
Module
Speech synthesiser
Chip
MEA8000
Port
EXT 26-112 extension port, beside the screen
Plugging in
tick the module in EXTENSIONS, on the Explore the machine page
  • SYNTHESIS8 kHz

    by formants, like the speech synthesisers of 1985

  • FRAME4 bytes

    8, 16, 32 or 64 ms, parameters gliding from one to the next

  • FORMANTS4

    resonators in cascade

  • REGISTERS&HA7FE

    2 bytes: data and command

01 / WHAT IT DOES

A voice made of resonances.

Human speech is a sound made by the vocal cords, or a breath, filtered by the mouth and nose: the resonances of that filter, the formants, are why an a does not sound like an i. The MEA8000 reproduces this principle. A periodic pulse (vowels, voiced consonants) or a noise (s, sh) goes through four resonators in cascade, whose frequencies and bandwidths the chip glides from one frame to the next.

On the Thomson machines, the program had to supply the frames itself. The TO2026 adds a reading layer: SPEAK transcribes the text into phonemes with French reading rules, without a dictionary (numbers are read out in words, punctuation gives pauses and intonation), then turns each phoneme into frames. The voice is robotic, as in 1985, but understandable.

02 / THE REGISTERS

Two bytes, and four-byte frames.

The program first writes the starting pitch into the data register, then the frames, byte by byte. The chip keeps one frame ahead: bit 7 of the status tells when it can take another. Pitch variation 16 selects noise instead of voice.

ADDRESS OR BYTECONTENTROLE
&HA7FEdata (write)starting pitch, then the frame bytes
&HA7FFcommand (write)bit 4: stop speaking
readstatusbit 7 set: ready for a frame
frame, byte 0BW1 BW2 BW3 BW4bandwidths of the 4 formants, 2 bits each
frame, byte 1FM3, FM2frequency of formant 3 (3 bits), then formant 2 (5 bits)
frame, byte 2FM1, amplitudeformant 1 (5 bits), then the high 3 bits of the amplitude
frame, byte 3amplitude, duration, pitchlow amplitude bit, duration (8 to 64 ms), pitch variation (5 bits; 16 = noise)

03 / IN BASIC

Making the machine speak.

STATEMENTEFFECT
SPEAK texte$reads a French text in the background; the next sentence queues up
SPEAK PITCH n / SPEAK SPEED npitch 50 to 400 (110 by default), rate 30 to 300 (100)
SPEAK PHONEMES p$says a sequence of phonemes, written as PHONEMES$ returns them
SPEAK CODE o$sends raw bytes to the chip, one character per byte
SPEAK STOPstops speech
SPEAKING / WAIT SPEAKtrue while speaking / wait for the end
PHONEMES$(texte$)the phoneme transcription, to check or adjust it
PROGRAM
speak "Bonjour, je suis le TO deux mille vingt-six."
print "je parle :"; speaking
wait speak
print "fini :"; speaking

On the speaker: “Bonjour, je suis le TO deux mille vingt-six”, in a synthetic voice.

ON SCREEN
je parle :-1
fini : 0

Phonemes are separated by spaces; _ marks a pause. A higher voice then says “bonjour”.

PROGRAM
print phonemes$("bonjour")
print phonemes$("21 chats")
speak pitch 160 : speak phonemes "b o~ Z u R"
wait speak : speak pitch 110
ON SCREEN
b o~ Z u R
v e~ _ e _ e~ _ S a

04 / BY HAND

Reading the status of the chip.

The status register is read with PEEK, from both BASICs. A program that sends its own frames waits for bit 7 to rise before each new frame; SPEAK CODE does it for it.

PROGRAM
print "pret :"; (peek(&HA7FF) and 128) = 128
speak "un"
print "parle :"; speaking
speak stop
print "arretee :"; speaking
ON SCREEN
pret :-1
parle :-1
arretee : 0