Speech Synthesis Module for the Acorn Atom

(NOTE: 6522 VIA REQUIRED)

The information contained in this leaflet is sufficient to enable the construction of a speech sythesis module for an Acorn Atom. This circuit is based on the general Instruments speech processor IC, SPO256, which produces complex speech sounds known as ALLOPHONES. Linking the allophones. together it is possible to reproduce entire word lengths thus producing synthetic speech. There are sixty-four allophones available which can be used to produce any English word or phrase, therefore this speech synthesis module does not have a limited vocabulary, nor does it require dedicated speech EPROMs.

Example programs are provided to demonstrate usage of the speech module and its capability.

This text has been scanned from the original paper, OCR'd and converted to HTML to make it more readable and for less storage and download times, It has been proof-read at least once, but of course may have mistakes!


Circuit Description

Figure 1 shows the complete circuit diagram of the speech synthesis module together withe a detailed component list.

IC1 is the SPO256 processor which incorporates the following functions:

  1. A 16K ROM which stores the data and the program instructions.
  2. A programmable digital filter that can simulate a VOCAL TRACT.
  3. A microcontroller that controls data flow and "word string" assembly
  4. A pulse width modulator that produces a digital output.

The speech processor IC is supplied with clock pulses by an oscillator formed by NAND gates N1, N2, N3 and associated components. The oscillator f requency is approximately 3.2 MHz and can be varied slightly by applying a logic 1 or 0 via resistor R7 (NOTE: The oscillator is designed for a 74L00 IC and should NOT be substituted with 74LS00 or 7400N series ICs unless design changes are made to ensure oscillation at the right frequencies). The inputs to the unused gate are connected to VCC.

Pin 24 of IC1 gives a digital output and is converted to an analogue signal by passing it through a 5 KHz low-pass filter. IC2 is an amplifier LM386 and is capable of driving a small loudspeaker. The analogue signal is fed to the input of this IC and thus to the loudspeaker. The circuit board layout supplied has provision for a small optional jack socket. It enables the connection to a remote loudspeaker or auxilliary amplifier.

The address lines of the speech processor IC A1 to A6 are connected to PORT B of the 6522 VIA in the Atom (PB0-PB5). PB6 is used to change the frequency of the oscillator and the therefore change the pitch of the voiced output. PB7 is connected to the SBY output of the speech processor IC and is used to indicate to the Atom that IC1 is inactive.


Construction

The circuit can be constructed on either matrix board (eg. VEROBOARD) or printed circuit board. A suggested component layout and foil pattern is given by figures 3 and 4. (The connections to the board conform to the EUROCARD standard so as to mate with the EURO connectors).

Assembly of the circuit on the printed circuit board should not present any problems but particular care should be taken with the orientation of the integrated circuits, especially IC1.

If the optional jack socket is not to be fitted it will be neccesary to replace it with a wire link. (LK1).

The speech module consumes about 60 mA. If you have a fully expanded Atom powered by the Acorn Atom mains adapter it will probably be necessary to use an alternative power supply or power the speech module separately.

When the construction is complete and the assembly has been thoroughly checked the module may be connected to the Atom. The speech module may be connected to the Atom by means of EURO connector or by direct wiring. If direct wiring is to be adopted figure 2 shows the connections to the Atom board (viewed from the component side).


Setting Up and Testing

Assuming the module has been assembled correctly there is very little setting up required. After connecting the speech module to the Atom, set the preset resistor P1 to the mid-point position and press the Atom break key. Now type in the following: ?#B802=127;?#B800=55. You should now hear the sound of white noise (similar to a radio off-tune). Press the break key to stop the sound. Now type in: ?#B802=127;?#B800=34 and a buzzing sound should now be heard, this can be used to adjust resistor P1 for the required volume.

If you now enter the following test program, all of the available allophone sounds will be produced and tested.

Allophone Test Program

10 ?#B802=127;C=0;@=0;?#E1=0
20 P.$12"ALLOPHONE NUM. "C
30 ?#B800=C;C=C+1
40 IF ?B800<128;G.40
50 ?#B800=0;?#B800=1;?#B800=0;
60 F.N = 0 TO 30;WAIT;N.
70 IF C<128; G.20
80 ?#E1=#80;END

NOTE: Although there are 64 allophones available, the test program will step through 128.
The first 64 being the normal allophone set, and then repeated at the lower pitch to give the second 64.

This program will produce the allophone sound and display the decimal value required to produce it, as this program is running check the sound and the decimal value with the allophone table (Table 1). To get the decimal value for the lowest pitch sounds, add 64 to the number shown for the normal pitch sound.

If all is well and your speech module is operating correctly try running the programs supplied. If you have problerms the following paragraph is provided to help you solve them.


Some Faults and Causes

As the speech module is dominated by integrated circuits there is not much that can go wrong apart from assembly faults, here are a few hints on problem solving.

NO SOUND OUTPUT Check oscillator connections and connection between the oscillator IC1 and IC1 pin 27. Check the output connections of IC1, the 5 KHz low-pass filter and all amplifier connections.
SOUND PERSISTS If you have persistant sound that cannot be stopped by pressing the break key, check connections between PL6 b6 (NRST) and IC1 pins 2 and 25.
MISSING ALLOPHONES If on running the allophone test program it is found that some of the allophones are missing (apart from pauses) check the address line A1 to A6 and the relevant PL6 connections.
NO PITCH CHANGE Check connections between resistor R7, the oscillator and PL6 a4

Programs

The following programs demonstrate the READ/DATA techniques required to drive the speech module. If you have a utility ROM that enables read/data statements to be used, programming becomes a little easier.

The REM statements in program 1 explain some of the program parts which make up the whole program, some of these statements are a necessary requirement in all programs regardless of the techniques employed, these are:

SET 6522 I/P & 0/P LINES ?#B802=127
WAIT FOR END OF ALLOPHONE IF ?#B800<128 G. (go to beginning of statement)
?#B800=0 (line 80) is required to end the allophone generation prior to the start of the next allophone sound.

ALLOPHONE SPEECH SYNTHESIS - DEMONSTRATION OF READ/DATA TECHNIQUES

 10 ?#B802=127; REM SET 6522 I/P & O/P LINES
 20 C=#2900; DO C=C+1; U. ?C=#5E; C=C+1; REM FIND DATA POINTER
 30 DO V=?C-48; IF 1?C=44;G.a; REM FIND ALLOPHONE VALUE
 40 V=V*10+1?C-48;C=C+1; IF 1?C=44;G.a
 50 V=V*10+1?C-48;C=C+1;
 60aC=C+2; ?#B800=V; REM POKE VALUE FOR ALLOPHONE
 70bIF ?#B800<128;G.b; REM WAIT FOR END OF ALLOPHONE
 80 ?#B800=0
 90 IF ?C=13; C=C+4
100 U. ?C=#5E
110 END
200^91,90,71,109,96,3,17,12,12,55,55,3,
210,12,12,55,55,3,26,16,9,52,55,55,26,26,44,1,21,3,
220,42,15,16,9,49,22,13,51,55,3,55,9,19,50,3,
230,55,55,12,11,1,18,7,55,55,12,55,55,3,28,58,
240,2,21,3,40,40,58,3,29,19,3,20,49,42,58,11,3,
250,26,13,24,16,3,42,15,16,9,49,22,13,51,3,
260,13,53,45,41,12,1,44,3,13,31,3,49,31,3,
270,67,67,56,32,3,29,19,3,26,45,40,40,51,2,28,2,7,13,68
280,84,68,127,83,68,119,83,68,97,83,68,83,68,71,104,68,
290,74,83,68,84,114,68,70,68,74,84,68,106,84,68,
300,71,109,68,71,80,68,71,75,68,117,68,73,83,68,
310,106,89,95,68,123,68,71,119,119,68,
320,77,83,68,113,95,68,99,83,68,97,79,65,92,126,113,95,68,
330,71,105,119,68,112,70,68,107,71,66,97,68,
400^

The ^ is an up-arrow in the scan of the original text. This is not a standard Atom character, so presumably a limitation of the printer that was used.


ALPHABET TEACHER

PROGRAM 2

 10 P=#2800;P.$21;[JSR #FFE3; STA #80; JSR #FE52; RTS;]; P.$12
 20 ?#B802=127
 30 LI.#2800;IF ?#80<65 OR ?#80>91;P.$12;G.30
 40 ?#B800=0; X=#2A3D; DO X=X+1; U.?X=?#80; X=X+1
 50 DO A=?X-48; IF 1?X==44; G.80
 60 X=X+1;A=A*10+(?X-48); IF 1?X=44;G.a
 70 X=X+1;A=A*10+(?X-48);
 80 ?#B800=A; X=X+2
 90 IF ?#B800<128; G.90
100 ?#B800=0; U.?X=33; ?#B800=1; G.30
110A20,!B63,19,!D33,19,!E19,!F7,40,!G10,19,!H20,50,!C55,19,!
120I6,!J10,20,!K42,20,!L7,45,!M7,16,!N7,11,!O53,!P9,19,!
130Q42,25,31,!R59,!S7,55,55,!T13,19,!U49,31,!
140V35,19,!W33,15,1,28,62,2,49,31,!X7,41,55,!
150Y48,6,!Z43,7,2,33,!

This program is a simple example showing how the speech board may be used as a teaching aid for the young. When a letter key is depressed the Atom will speak the letter.


COUNTDOWN

PROGRAM 3

 10 P=#2800;P.$21;[JSR #FFE3; STA #80; LDX @#10; STX #B000; RTS;]
 20 CLEAR 4; G.250
 30A0,49,31,2,27,26,35,2,26,41,13,12,35,20,13,12,1,21,2,
 40,29,19,2,55,55,7,45,40,2,33,12,55,13,39,15,41,13,2,
 50,16,7,41,26,11,12,55,16,2,12,11,17,12,12,55,55,2,
 60,42,15,16,9,49,22,13,51,2,!
 70B0,9,39,7,55,55,2,29,19,14,6,2,13,2,8,19,2,13,31,2,0
 80,55,55,13,24,9,2,29,19,2,42,32,11,17,1,33,32,11,3,!
 90C0,l3,6,16,2,12,12,55,55,2,36,7,17,12,1,44,2,37,58,13,2,!
100D0,77,95,66,109,84,81,67,6,35,2,10,30,55,17,3,
110,7,41,55,2,9,45,53,21,7,21,3,!
120E0,42,23,11,61,39,26,13,22,45,20,37,24,11,55,55,2,
130,42,32,11,17,1,33,32,11,2,55,55,13,24,2,9,21,3,!
140F0,13,7,11,3,!
150G0,56,6,56,3,!
160H0,20,3,13,3,!
170I0,55,7,35,11,3,!
180J0,55,12,2,42,55,3,!
190K0,40,6,35,3,!
200L0,40,58,3,!
210M0,29,39,19,3,!
220N0,13,31,3,!
230O0,48,15,11,3,!
240P0,43,19,39,53,3,!
250 Z=65; R=#2940; GOS.t
260 A=A.R.%27+65; T=0
270 Z=66; GOS.t
280 LIN.#2800; T=T+1; IF ?#80=A; G.330
290 Z=T+69; R=#2B50+T*10; GOS.t
300 IF T=6; Z=67; R=#2990; GOS.t
310 IF T>10 G.340
320 G.280
330 P.$6,$12; Z=69; R=#2A00; GOS.t; END
340 Z=68; R=#2A00; GOS.t
350 F.N= 0 TO 100; ?#B000=A.R.%#FF; WAIT; N.; ?#B000=#40; END
360t?#B802=127; C=R; DO C=C+1; U. ?C=Z; C=C+1
370 DO V=?C-48; IF 1?C=44;G.a
380 V=V*10+1?C-48;C=C+1; IF 1?C=44; G.a
390 V=V*10+1?C-48;C=C+1
400aC=C+2; ?#B800=V
410bIF ?#B800<128; G.b
420 ?#B800=0; IF ?C=13; C=C+4
430 U. ?C=#21; R.

EXAMPLES OF WORDS MADE FROM ALLOPHONES

Am 26, 16   Me 16, 19
Computer 42, 15, 16, 9, 49, 22, 13, 51   North 11, 58, 29
Down 33, 32, 11   Please 9, 45, 19, 43
East 19, 55, l3   Right l4, 6, 2, 13
Fast 40, 59, 55,13   Slow 55, 55, 45, 53
For 40, 40, 58   South 55, 55, 32, 29
Go 34, 53   Stop 55, 55, 13, 24, 9
Hello 27, 26, 7, 45, 32   The 29, 19
Help 27, 7, 45, 1, 9   To 13, 31
I 6   Up 15, 2, 9
Left 45, 7, 40, 2, 13   West 46, 7, 15, 13

Table 1: Allophone Address table (and example words)

Allophone Decimal
Value
Sample
words
Allophone Decimal
Value
Sample
words
AA * 24 nOt, lOt MM 16 atoM, aM
AE * 26 Am, Allophone NG 44 talkiNG, lookiNG
A0 * 23 lOng, gOng NN1 11 acorN, iN
AR 59 chARm, ARm NN2 56 Now, New
AW 32 sOUth, mOUth OR 58 nORth, fOR
AX * 15 trOUble, sUccess OW 53 allOphone, slOW
AY 6 fIve, alIve OY 5 bOY, tOY
BB1 28 trouBle, alphaBet PA1 0 10 ms pause
BB2 63 Beat, Bat, PA2 1 30 ms pause
CH 50 CHoose, pitCH PA3 2 50 ms pause
DD1 21 boarD, feeD PA4 3 100 ms pause
DD2 33 Down, Do PA5 4 200 ms pause
DH1 18 raTHer, THeir PP 9 uP, Please
DH2 54 laTHe, baTHe RR1 14 Right, Run
EH * 7 hElp, lEft RR2 39 tRouble, gRass
EL 62 troubLE, angLE SH 37 SHop, fiSH
ER1 51 settER, lettER SS * 55 eaSy, Stop
ER2 52 tURn, fERn TH * 29 THe, THey
EY 20 Acorn, stAY TT1 17 This (???),hiTs
FF * 40 For, alPHabet TT2 13 Talking, To
GG1 36 Guess, Gun UH * 30 pUll, bUll
GG2 61 Grass, Glass UW1 22 compUters, prodUcer
GG3 34 Go, Golf UW2 31 yOU, tO
HH1 27 Help, Hello VV 35 leVel, oVer
HH2 57 Hop, Hoop WH 48 WHite, WHat
IH * 12 sYnthesis, thIs WW 46 West, Wet
IY 19 thE, spEEch XR 47 faRE, paIR
JH 10 Jump, Jug YR 60 EAr, nEAr
KK1 42 aCorn, Computer YY1 49 You, Your
KK2 41 talKing, asKing YY2 25 Yacht, Yes
KK3 8 Count, Cook ZH 38 treaSure, meaSure
LL 45 aLphabet, taLking ZZ 43 pleaSE, Zoo

** FOR LOWER PITCH ADD 64 TO THE VALUES INDICATED.
* THESE ALLOPHONES CAN BE DOUBLED

PAUSES

PA1 ( 10 ms.) - before BB,DD,GG,and JH
PA2 ( 50 ms.) - before BB,DD,GG,and JH
PA3 ( 50 ms.) - before PP,TT,KK,and CH, and between words
PA4 (100 ms.) - betmeen clauses and sentences
PA5 (200 ms.) - between clauses and sentences

Circuit Diagram

Circuit diagram


Parts List

Resistors
R1   10R
R2   4k7
R3,4 33k
R5   2k2
R6   1k
R7   10k
P1 10k variable
Capacitors
C1        22uF
C2,6,7,10 100nF
C3,4      22nF
C5        2.2uF
C8        100uF
C9        18pF
Semiconductors
IC1 SPO256
IC2 LM386
IC3 74L00

Miscellaneous

LS1 Loudspeaker, 8R
SK1 64-way Indirect edge connector, a/b/socket (DIN41612)
SK2 1/8" miniature phone jack socket

Figure 2.

Component Side

Connections


Figure 3.

PCB legend. Click for full size image


Figure 4.

PCB tracks. Click for full size image