Introduction

LambdaSpeak 3 is a versatile hardware extension for the Amstrad / Schneider CPC 464 (Plus), 664, and 6128 (Plus) home computer, with a focus on speech synthesis and PCM sample playing.

It offers:



  1. DECtalk-based Text-to-Speech (TTS) synthesis: the Epson S1V30120 TTS chip on the utilized mikroBUS "TextToSpeech Click!" daughterboard from MikroElektronika implements DECtalk v5 -- a natural sounding speech synthesizer for English and Spanish, with different voices. DECtalk can even sing. The DECtalk mode is very powerful and versatile, but the DECtalk control language can be difficult to program. Hence, a simplified control language for the S1V30120 is offered as well, the so-called Epson mode. The DECtalk mode is used to implement two Amstrad CPC-specific modes: LambdaSpeak offers a DECtalk-based emulation of the Amstrad SSA-1 Speech Synthesizer, and an emulation of the DK'tronics Speech Synthesizer as well. These retro speech synthesizers from ~ 1985 used the SP0256-AL2 from General Instruments. The emulation is faithful enough such that software that supports these speech synthesizers (e.g., games such as "Roland in Space" from Amsoft) works. However, the DECtalk-based speech sounds different from the original SP0256 AL2-based speech. For higher authenticity, LambdaSpeak can optionally be fitted with a SP0256-AL2 as well, see next.

  2. Optional GI SP0256-AL2 speech synthesis: this chip was used in the official Amstrad CPC SSA-1 speech synthesizer as well as the D'tronics speech synthesizer for the CPC. With fitted SP0256-AL2, LambdaSpeak 3 offers a modern re-implementation of these historic speech synthesizers that sound just like the originals from ano 1985.

  3. PCM Sample Playing Capability / Amdrum emulation: the Amdrum was a digital sample player / drum computer for the CPC. It consisted of a simple Digital-to-Analog (DAC) converter connected to the CPC databus. Bytes transmitted to the DAC would be turned into PCM audio. Hence, the PCM sample data has to be "streamed" from the CPC over the databus to Amdrum to play a PCM sample. The Amdrum supports 3 channels of 8 Bit audio in a decent quality; the mixing of PCM channels is done in software by the CPC / Z80 though, in real time, to achieve polyphony. LambdaSpeak 3's Amdrum emulation sounds just as good as the original (if not better).

  4. High Quality Polyphonous Autonomous PCM Sample Playing Capability: unlike the Amdrum mode, which requires the CPC to send the PCM sample bytes in real time over the databus to the Amdrum DAC, this mode offers "autonomous" sample playing. LambdaSpeak 3 is equipped with a 128 KB SPI EEPROM, which serves as a persistent memory for PCM samples. Samples can be uploaded into the EEPROM memory from the CPC, and played back by sending a "Play PCM" command. This mode offers up to 4 channels of PCM polyphony, and > 16 kHz bandwith is possible. Of course, higher quality PCM samples / WAV files will take up more space on the EEPROM. Moreover, since no real time streaming of PCM sample bytes is required from the CPC for sample playback, the automous EEPROM PCM sample playback can be triggered even from a BASIC program. The playback mode offers up to 4 channels of PCM audio, and the pitch / sample playback speed can be controlled to some extent as well. A sample can be as large as 128 KBs. The resulting PCM quality can be much higher than with the Amdrum mode.

  5. An UART / Serial Interface: this versatile general purpose UART / Serial Interface offers flexible BAUD rates, 5 to 8 bits per frame, and different parity bit and number of stop bit configurations. The UART Interface can either be offered via a PIN header on the LambdaSpeak 3 PCB such that a FTDI cable or RS232 TTL serial converter can be hooked up directly via DuPont cables, or an UART module can be soldered in permanently. The 4 $ MP3 UART Module from Catalex is a good choice for such a module - it offers MP3 playback from a MicroSD card. See below. Moreover, a MIDI breakout module works perfectly fine, providing MIDI in and MIDI out for the CPC!

  6. An I2C Interface: this interface is currently used for a Real Time Clock (RTC) module. LambdaSpeak 3 can be fitted with an optional DS3231 RTC module, a 6 $ module. At the time of this writing, the LambdaSpeak 3 firmware only supports the DS3231 RTC, but it is conceivable that additional I2C modules will be supported in the future as well. The DS3231 also contains a Temperature Sensor.

Old vintage retro computers can benefit a lot from modern inexpensive modular electronics using standards such as UART, SPI, and I2C - add speech synthesis, an MP3 player, a Real Time Clock with Temperature Sensor, and a universal serial interface (UART) to your Amstrad / Schneider CPC for just a few dollars!

News Flash - ComputerShopper briefly covered LS3 in the their 12/2019 issue - I got permission to publish the excerpt / screenshot from the editor-in-chief: 

For full details, please refer to the LambdaSpeak 3 GitHub page.

A few YouTube videos:


CPC Connection

LambdaSpeak 3 is a MX4-compatible IO extension board. To connect it to the CPC, it either requires a cable (edge connector / male Centronics to 50 pin female IDC connector), or a CPC expansion port extender / backplane, such as the "Mother4X" or the "LambdaBoard".

LambdaSpeak 3 has an optional barrel jack for a 5 V DC power supply; center polarity is positive. This should only be used with a stabilized DC PSU in case the CPC or backplane is incapable of providing enough power for LambdaSpeak 3.

Hardware Description

Z80 / CPC IO Ports

LambdaSpeak listens to IO Read and Write Requests from the Z80 CPU on port &FBEE (all modes with the exception of Amdrum mode) as well as port &FBFE (all modes with the exception of the Amdrum mode). Traditionally, &FBEE was used by the Amstrad SSA-1 speech synthesizer, and &FBFE by the DK’tronics speech synthesizer. The two ports are indistinguishable from the LambdaSpeak 3 firmware point of view.

All LambdaSpeak 3 communication goes over these ports, with the exception of the Amdrum mode. The Amdrum mode uses ports &FFxx, where xx is arbitrary. This is the port traditionally being used by the Amdrum module.

Please note that also the EEPROM PCM upload and play modes, the serial interface, and the RTC uses &FBEE (and &FBFE).

Audio Mixing / Routing

LambdaSpeak 3 processes 3 or 4 sources of audio. The 10 position DIP switch is used to assign these different sources to either the left or right audio channels of LambdaSpeak's stereo output jack. A source can also be assigned to both left and right. The DIP switches 1 to 4 determine which audio source is routed to the left, and the switches 6 to 9 are used to assign the right audio channel of the stereo output jack. Moreover, the non-plus CPCs also allows to loop back the audio signal into the CPC using the SND pin of the expansion port. The loopback audio signal then gets amplified and gets routed to the CPC’s internal speaker. This does not work for Plus CPCs though. Hence, switches 5 and 10 can be used to switch the loopback on or off. Regardless of the switches 5 and 10, an external amplifier can always be connected to LambdaSpeak's stereo output jack.

The audio sources processed and routed via the DIP switch are the following. The corresponding labels are printed on the PCB; see picture. Please note that there should be at most one audio signal routed to the left output channel, and at most one audio signal routed to the right output channel. It is OK to route one source to both left and right, but one should not route two sources (or more) to the same (left or right) channel!

From left to right, the DIP switches 1 to 5 and 6 to 10 are:

A reasonable default configuration for a LambdaSpeak 3 with SP0256-AL2 is 10001-01001. Hence, MIX on the left output channel, and Epson speech on the right output channel. Moreover, both are being heard in the CPC's internal speaker as well, so no need for an external amplifier.

A reasonable default configuration for a LambdaSpeak 3 without SP0256-AL2 is 00101-01001, resulting in raw ATmega PCM audio on the left channel, and Epson speech on the right. Moreover, the CPC speaker is turned on.

A reasonable default configuration for an Amdrum / PCM Sample Playing session could be 00101-00101, giving raw ATmega PCM audio on the left and right channel, and no speech output at all. However, an extra cable and external mixer and amplifier or dedicated loudspeaker could still be used for Epson speech (use the daughterboard’s own stero jack).

The 10 LED segment bar on the left is used to indicate the current mode / status of LambdaSpeak 3. The LEDs have the following meaning:

These different modes are going to be explained in more detail in the subsequent sections. PC = Power Cycle, RB = Reset Button, EOM = End of mode, CM = Change Mode (means that the control bytes To Enter a different mode will be accepted in that mode), &FF, &14 = sequence of command / control bytes in hexadecimal (first send 255 = &FF, then 20 = &14). HQ PCM = High Quality PCM (Pulse Code Modulation), > 18 khZ possible, 8 Bit PCM.

The 8 LED segment bar on the right is used to indicate the current / last byte transmitted from the CPC to LambdaSpeak (the last databus byte latched from IO port &FBEE). A out &fbee,byte BASIC command will show the byte in binary on the LED segment. Moreover, by removing the LED segment bar from its socket, the socket can be used as General Purpose Digital Output controlled by the CPC; for example, an 8-Relay Module can be driven by these outputs to control home appliances or other devices from the CPC. It is not possible to do General Purpose Digital Input over these ports, but the CPC's joystick port could be used for that purpose.

Overview of LambdaSpeak 3 Modes

The following automaton gives an overview of the different modes and transitions between modes:

The default mode is the SSA-1 Emulation mode. This mode is enabled after a reset (via &FF or reset button), or after a power cycle, for example.

Referring to the table above, the EEPROM PCM Play mode is the autonomous PCM sample playback mode; sample / wave files are being played back from EEPROM. Since this mode can also involve the SP0256-AL2 (addressed via Channel 10), the SP0 LED is being lit as well in this mode. Moreover, to upload the PCM samples from the CPC into LambdaSpeak's EEPROM, the EEPROM PCM Upload mode is being used.

LambdaSpeak 3 is controlled by sending "control bytes" or "commands" - the different modes are enable and disabled by sending control bytes. In normal operation mode (i.e., the standard dispatcher loop is running), each byte being sent to IO port &FBEE > 127 is considered a control byte. All bytes smaller 128 are considered as content (phonemes, text, ...) for the speech synthesizer. This is the behavior of LambdaSpeak's normal control byte dispatcher / main mode listener loop.

Moreover, the Serial Mode / UART has its own command dispatcher / listener loop, and follows different conventions. See below for an explanation of the Serial Mode. Other modes, such as the Amdrum Emulation mode, also do not interpret control / command bytes (each byte is considered a PCM sample).

In addition, there are "sub" modes for setting the RTC (Real Time Clock) time and calendar. These modes do not have a dedicated LED pattern. Normal operation is resumed after the clock (resp. calendar) has been set. To set the time, invoke control byte / command &DB, and then send the hours, minutes, and seconds to the databus (port &FBEE), one byte at a time. Likewise, to set the calendar, invoke control byte &DA, and then send the year, month, date, and weekday (1 to 7 for Monday to Sunday) on the databus, one byte at a time. The set time and set calendar sub modes are 'modal' in the sense that normal operation of LambdaSpeak 3 is suspended until all requested parameters have been received. While the set time and set date commands are still requesting parameters, normal control byte dispatching is disabled, and LambdaSpeak returns to normal behavior (hence exiting the modal "sub" mode) after the clock (resp. calendar) has been set. There is no special LED pattern to indicate these set time and set calendar "sub" modes.

Another sub mode is the echo test program which runs an echo program of &FBEE until reset button or power cycle (see below).

Note that, in the table above, PC stands for Power Cycle - the only way of quitting the Amdrum mode is to power cycle the CPC (and LambdaSpeak). This is of course always an option to quit any of the listed modes, but the Amdrum mode it is the only way of quitting it. EOO stands for end of operation; this means that normal control byte / command dispatching is resumed after all requested bytes have been received, so the mode terminates / quits itself and returns to LS 3 default mode. RB stands for the LambdaSpeak Reset Button -- with the exception of the Amdrum mode, the Reset Button is of course always an option to leave the current mode, but it is listed for a mode in the table above if there is no other way of quitting this mode.

Schematics

LambdaSpeak 3 was made with KiCad EDA v4.0.7, and "freeRouting.jar" did the routing.

You can find the Gerbers here:

https://cdn.hackaday.io/files/1656777088324768/lambdaspeak30-final.zip

They are also hosted on OshPark for immediate ordering:

https://oshpark.com/shared_projects/euyetNoj

Moreover, there is also a version in the Seeed Gallery: 

https://www.seeedstudio.com/LambdaSpeak-3-g-1230571

Please refer to the GitHub homepage for more details:

https://github.com/lambdamikel/LambdaSpeak3

Acknowledgements

Thanks to Dr. Stefan Stumpferl (TFM) for the RSX Software Driver and CPC ROM for LambdaSpeak:

http://futureos.cpc-live.com/

To Bryce from the CPC EU Wiki Forum Board for technical advise and guidance:

http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/

As well as Zhulien from this CPC Board as well, for suggesting the MP3 and Amdrum modes!


A big thanks to all who purchased LamdaSpeak 1.95, 1.99, and LambdaSpeak 3.0 so far!
Your continued support and enthusiasm for the product means a lot to me and keeps me going!!