Voice Messenger - Speech 64



Image: Speech 64 cartridge

This is one of many speech synthesizer cartridges for the Commodore 64 (others were the COMvoice, the Magic Voice, the ProVoice, the Voice Master, etc.). This one seems to have arrived on the market in 1984, and it is incompatible with Commodore's Magic Voice, meaning that it is probably completely unsupported by software. But let's face it, in those days that didn't matter so much, because most personal computer owners could at least program in BASIC.

Unlike some other speech synthesizers of the day, the Voice Messenger didn't have a pre-set vocabulary. It could translate any text into speech, and the programmer could specify the sounds using what the Voice Messenger's manual calls "allophones", which seem to be roughly equivalent to the "phonemes" of the Amiga's narrator.

The Voice Messenger adds commands to Commodore BASIC, so that BASIC programmers can easily use the unit. The BASIC commands are:

CommandFunction
INIT Initializes the voice unit. After INIT is executed, a copyright message appears on the screen, and the Voice Messenger will say the name of any letter or symbol that is hit on the keyboard. (Graphics symbols are merely voiced as "graphic".) The Voice Messenger uses the higher pitched voice by default.
KON [0|1] KON turns on the voicing of keys on the keyboard. KON 0 will make it use the low voice, KON 1 will make it use the high voice. The default is 1.
KOFFTurns off the voicing for keypresses.
SAY [0|1] "string" Makes the Voice Messenger voice the string in voice 0 (low) or voice 1 (high).
BYE Suspends Voice Messenger operation. BASIC will go back to normal until INIT is invoked again.

The Voice Messenger has an allophone buffer, which can contain up to 256 allophones. The BASIC variable SP% reports how much space is left in the allophone buffer, so that the programmer can avoid buffer overflow. This is necessary because the BASIC program continues to execute as the voice syntesizer works. Multiple SAY commands in a row can easily fill the buffer. Nothing bad happens, but words that don't fit in the buffer are never spoken.

There is also support for intonation, but this only works if the Voice Messenger is given allophones instead of normal text. Allophones entered as capital letters are intoned UP, and allophones entered as lowercase letters are not intoned.

The manual includes instructions and sample code for using the Voice Messenger in assembly language (machine code). In machine code, allophones are programmed using numeric codes according to these tables (note that there are no allophones for the letters x or q):

Allophone
(BASIC string mnemonic)
Hex CodeSounds Like
(aa)/(ay)14'ay' in hay
(ee)13'ee' in see
(ii)06'i' in hive
(oo)/(eau)35'o' in stove
(bb)3F'b' in bat
(dd)21'd' in do
(gg)3D'g' in got
(ggg)22'g' in big
(hh)39'h' in hoe
(ll)3E'l' in let
(nn)38'n' in no
(rr)0E'r' in ruin
(tt)0D't' in to
(yy)19'y' in yeah
(ar)3B'ar' in arm
(aer)2F'air' in repair
(ch)32'ch' in church
(ck)29'ck' in clock
(ear)3C'ear' in clear
(eh)1A'ar' in wary
(er)33'er' in leader
(err)34'ur' in purr
(ng)2C'ng' in tongue
(or)3A'or' in sore
(ou)16'oo' in root
(ouu)1F'oo' in food
(ow)20'ow' in now
(oy)05'oy' in boy
(sh)25'sh' in ship
(th)1D'th' in thin
(dth)12'th' in then
(uh)1E'oo' in took
(wh)30'wh' in which
(zh)26'z' in azure
Allophone
(BASIC string mnemonic)
Hex CodeSounds Like
a18phonetic
b1Cphonetic
c08phonetic
d15phonetic
e07phonetic
f28phonetic
g24phonetic
h1Bphonetic
i0Cphonetic
j0Aphonetic
k2Aphonetic
l2Dphonetic
m10phonetic
n0Bphonetic
o17phonetic
p09phonetic
r27phonetic
s37phonetic
t11phonetic
u0Fphonetic
v23phonetic
w2Ephonetic
y31phonetic
z2Bphonetic


Allophone
(BASIC string mnemonic)
Hex CodeSounds Like
(apostrophe)01very short pause
(space)03pause between words
(comma)04pause between phrases
(period)hybrid of 04+04pause between sentences

(Compiled from two tables in The Voice Messenger Speech 64 Programming Manual)

Note that there are less than 64 allophones. It takes only six bits to define this number (bits 0 to 5). Bit 6 is for the voice (0 = low voice), and bit 7 is for intonation (1 = intonate up).

Here is the sample ASM code, reproduced from section 6 of manual:

Initializing Speech Unit
(Not needed when accessing speech chip directly)
INIT	SEI		;disable interrupts
	LDA $A7F0	;select Voice Messenger ROM
	JSR $A121	;call set up routine
	LDA $A7F0	;disable Voice Messenger ROM
	CLI		;enable interrupts
*	LDA $02BE
*	ORA #$20
*	STA $02BE
	RTS

(* These three lines turn the Voice Messenger BASIC commands on,
but can be omitted if Voice Messenger is not going to be used from BASIC.)

Set bit 1 of $02BE to turn keyvoices off. (LDA $02BE, ORA #$02, STA $02BE)

Bit 3 of $02BE determines which voice is used.



Using the Speech Buffer
	JSR INIT	;call initialization routine
	LDY #$00
WAIT	LDX $CE5F	;is buffer full?
	DEX
	BEQ WAIT	;wait if so
	LDA DATA,Y	;else get allophone
	BEQ FINISH	;exit if finished
	LDX $CE64
	STA $CF00,X	;store allophone in buffer
	INC $CE64	;and update pointer
	INY		;next allophone
	JMP WAIT

FINISH	RTS

DATA	DB $5B,$C7,$7E,$75	;the four data bytes
	DB 0			;end marker


Using Text to Speech Conversion
	JSR INIT	;call initialization routine
	LDA $02BE
	AND #$FE
	STA $02BE	;select low voice
NEXT	LDA DATA,X	;get character
	STA $CE70,X	;and store it in buffer
	BEQ FINISH	;if last char (null byte)
	INX
	JMP NEXT

FINISH	INC $CE63	;start conversion
	RTS

DATA	DB 'THIS IS A DEMONSTRATION OF TEXT TO SPEECH CONVERSION'
	DB 0


Using the Speech Chip Directly
	LDA #$0F
	STA $D418	;set sound to maximum
	LDX #$00
STATUS	LDA $DE00	;is speech chip ready?
	BPL STATUS	;wait if not
	LDA DATA,X	;else get allophone
	STA $DE01	;and send to low voice
	BEQ FINISH	;end if last allophone
	INX
	JMP STATUS	;get next one

FINISH	RTS

DATA	DB $1B,$87,$3E,$35
	DB 0		;end of data

One very interesting feature of the Voice Messenger is that the supplied cabling actually feeds the speech synthesizer's output into the C64's audio input. This should allow the C64 to modulate the voice.

SampleDescription
1 The alphabet, as said from the SAY command.
SAY "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
2 Some characters are pronounced differently when KON is in effect and a key is pressed. This is what the Voice Messenger says for the 'Z' key.
3 Numbers, as said from the SAY command.
SAY "1  2  3  4  5  6  7  8  9  0"
4 Another different pronunciation from a keypress. The Voice Messenger was made in the U.K., so I wonder if the plant was on the River Severn? :-)
5 The result of:
SAY 0 "VOICE MESSENGER SPEECH SIXTY 4"
(low voice)
6 The result of:
SAY 1 "VOICE MESSENGER SPEECH SIXTY 4"
(high voice)
7 At first I thought, by dim memory, that the low voice sounded similar to a Cylon Centurion from Battlestar Galactica. It doesn't.
SAY 0 "BY YOUR COMMAND"
8 It's possible to make interesting noises just by playing with intonation.
SAY "[aaAAaaaaAA]"
9 This sounds like a helicopter. Or maybe a sewing machine. :-)
SAY 0 "hhhhhh"
10 A real test of the Text to Speech routine:
SAY "HROTHGARS COOL OLD JUNK PAGE"
It didn't do too well, but even I can't pronounce 'Hrothgar' as spoken by the author of Beowulf.

This interesting device, in its original box and with manual and cabling, was donated to my collection by Frank McCormick, CoSysop and programmer of McBBS, one of the best BBSes in the city of Montreal from 1987 to 2000. Thanks Frank!

Image: Speech 64 box, manual, and cartridge

[Hrothgar's Cool Old Junk Page] 2007-07-21