Close
0%
0%

LambdaSpeak 4 aka LambdaSpeak AI

Where we harness the power of AI and OpenSource to spin a new generation of LambdaSpeak 3 for the Amstrad CPC # RC2026/10 Entry! #

Similar projects worth following
The successor of LambdaSpeak 3, built with AI: LambdaSpeak AI. Speech, sound, MP3, MIDI, ROM emulation, DSK emulation... what else?? And for a third of the price of LambdaSpeak 3!

https://www.retrochallenge.org/p/entrants-list-202610.html

LambdaMikel


LambdaMikel's avatar Platform: Amstrad CPC

In 2018, LambdaSpeak 3 brought new dimensions in speech synthesis and sound to the Amstrad CPC. It's MikroE S1V30120 text2speech module offered DECtalk - for the first time, CPC users could enjoy natural sounding speech synthesis on the CPC. It was also able to emulate the vintage Amstrad SSA-1 and DK'tronic speech synthesizer, which used the infamous GI SP0256-AL2 chip. Now, 8 years later, we have incredibly powerful MCU, in particular, the RP2350. Harnessing the power of OpenSource and AI, using Claude Code, we are realizing LambdaSpeak 4. The device will need minimal hardware. The firmware was already written by Claude - I will design the PCB and hopefully, by the end of the month, we will have a fully working LambdaSpeak 4, at a third of the LambdaSpeak 3 price, but with some amazing new features as well!

https://hackaday.io/project/206813/log/252254-almost-feature-complet


Post-Mortem RetroChallenge 2026/10 Update - Test on the CPC 6128 with FDC Emulation Disabled


Post-Mortem RetroChallenge 2026/10 Update - PlayCity 6channel YMZ Emulation & Disk Emulation (FDC µPD765A)


RetroChallenge 2026/10 Final Update: 



https://hackaday.io/project/206813/log/252464-done-for-this-year-a-sampler-a-screen-reader-and-a-cpc-that-reflashes-its-own-rom-board


RetroChallenge 2026/10 Three Quarter Update: 


https://hackaday.io/project/206813/log/252254-almost-feature-complete


RetroChallenge 2026/10 Halftime Update: 



https://hackaday.io/project/206813/log/251834-10132026-pcbs-arrived-on-time-for-the-rc202610-halftime-update


RetroChallenge 2026/10 Start: 

https://hackaday.io/project/206813/log/251475-let-the-rc202610-challenge-begin

  • Works on the CPC 6128!

    Michael Wessel • 3 days ago • 0 comments

    For the 664 and 6128 version of the firmware, we are disabling the FDC / disk emulation; hence |flashdiscs etc. won't be supported. These CPCs already have their own FDCs and disk capabilities.

  • Disk emulation is working!

    Michael Wessel • 6 days ago • 0 comments


    We are now faithfully emulating the Amstrad CPC floppy disc controller (µPD765A). Unlike other cards, this is not just firmware-patching, so original copy-protected games and custom disk loaders work, as demonstrated with the Batman Forever 80track one-disk version here.


    LambdaSpeak AI gives you a card-internal database of 52 (!) flash-based disk images that can be activated via RSX commands. The RSX commands it brings in its own (emulated) ROM. A TKinter client program for loading and saving disk and ROM images over a simple USB cable is provided. We do not support Wifi, because I don't like Wifi (it is likely that Wifi-based cards will stop working in the near future, but USB is there to stay). Once your card has been uploaded with all your favorite disk and ROM images, you no longer need the client program. One card to rule them all: LambdaSpeak AI.

    This is the ultimate all-in-one solution for the CPC - for the 464, the only thing in addition to LambdaSpeak AI that you may want is a capable RAM expansion (ideally, offering a C3 mode, such as the one from Revaldinho's).


    Features:

    • natural sounding DECtalk speech
    • faithful GI SP0256-AL2 emulation (Amstrad SSA-1 and DK'tronics speech synths)
    • Amdrum emulation
    • PlayCity emulation: 6 channels of YMZ chiptune sound!
    • ROM emulation: 8 slots, re-writable with a client program from the PC over USB cable
    • LambdaDrum PCM mode: CD-quality 8channel PCM sound
    • MIDI: standard MIDI IN / OUT DIN sockets on board
    • optional Battery-buffered Real Time Clock (RTC)
    • optional MP3 module (playback from SD card)
    • serial interface / UART headers
    • disk emulation (FDC µPD765A) - 52 flash-based re-writable disk images
    • PARADOS or AMSDOS compatible
    • compatible with copy protected and custom-loader software
    • power and comfortable on-board RSX extension ROM
    • speaking vector graphics head demo ROM
    • and and and!


    LambdaSpeak AI needs one more PCB revision, and then it is going to be open source by the end of the year.

  • 11/2/2025 - PlayCity Emulation in LambdaSpeak AI!

    Michael Wessel • 11/03/2026 at 04:14 • 0 comments

    Another breakthrough - TotO's PlayCity sound card (~2014) offers 6channels of YMZ. As of today, LambdaSpeak AI emulates PlayCity - and offers SP0256-AL2 or DECtalk speech on top of it. Could be cool for demos: 6channel chip tunes + speech and/or DECtalk singing! 

  • Done for this year: a sampler, a screen reader, and a CPC that reflashes its own ROM board

    Michael Wessel • 10/29/2026 at 14:18 • 0 comments

    The Challenge is over! 

    Video: LambdaSpeak AI — the final RetroChallenge entry

    The last stretch turned the card into something I hadn’t planned at the start. It was a speech and sound card; it ended up a sampler the CPC can load and play from BASIC, and — the one I’m happiest about — a way to give speech to software that was never written for it.

    It brings its own ROMs

    Worth saying plainly, because it changes what the card is: you don’t need a disc drive, or a tape, to do anything fun with it.

    The card holds four 16 KB expansion ROMs in its own flash and serves them to the CPC over the bus. Two of those slots are already full of things worth having — the LambdaSpeak AI ROM with its 57 RSX commands, and the vector head. Plug the card into a bare 464, switch on, and you have speech, the voice modes, the clock, the drum modes, the sampler, MIDI, MP3 and an animated talking head, all from ROM, typed straight into BASIC. Nothing to load.

    And the slots are rewritable from the CPC itself with |ROMUP, so the ROM set isn’t fixed either.

    |SPSCREEN — speech for programs that can’t speak

    The card reads the CPC’s text screen aloud. |SPSCREEN takes the whole thing, or |SPSCREEN,x1,y1,x2,y2 a window, in the coordinates LOCATE already uses.

    The point is retrofitting. You don’t patch a program’s text output, you don’t need its source, you don’t need it to know the card exists. Let it print as it always did, then read the part that matters — one added line. It reads with TXT RD CHAR, so it sees what’s genuinely on the screen, including anything the firmware or another ROM drew. Trailing spaces go, and a row of nothing but spaces ends the utterance instead of being spoken, so a blank line becomes a pause and the phrasing comes out right for free. |STOP cuts it off mid-sentence.

    Works in MODE 0, 1 and 2 — it takes the width from the current mode.

    The vector head

    The most fun thing on the card isn’t on the card at all — it’s a project in its own right. A 1985 hand-digitised wireframe head, redrawn in Z80, animated in real time: type a sentence and the lips, jaw, chin and eyes move on the allophones, not on a timer.

    That lip-sync is why &E9 exists on this card. The CPC sends text, the card runs it through its letter-to-sound rules and hands the allophone stream back, so the head knows what it’s about to say before it says it. Getting that stream out through &FBEE fast enough was one of the harder bits of the whole month — the head reads it in tight machine code, far quicker than the card’s main loop comes round, so it ends up DMA-fed straight from the PIO’s FIFO.

    New this time: it runs from one of the card’s own ROM slots instead of a disc, with its own LambdaSpeak AI greeting. There’s an Apple II version too, speaking through [Perfect Paul ].

    Also new

    • Its own expansion ROM. 57 RSX commands, written fresh rather than ported. Last time I said we were starting on this; it’s done.
    • |PIANO — a polyphonic PCM keyboard on the CPC’s own keys. 38 keys across both letter rows in a tracker layout, C4 to G#6, cursor keys transposing by octaves and semitones, eight voices sustaining independently. The piano sample is synthesised rather than recorded, so it ships with the project.
    • |PCMUP / |PCMDEF — upload a sample from BASIC into the card’s flash, say what rate and pitch it was recorded at, and note mode resamples it per key. It survives a power cycle. The Ghostbusters clip came off the 1990s LambdaSpeak sample disc.
    • |ROMUP — the CPC reflashes the card’s own expansion ROM slots from BASIC. Four 16 KB slots, no programmer, no EPROM eraser. The new ROM is live before you even reset.
    • A demo disc, 28 BASIC programs, one for every feature — for when you do have a drive.

    How this was built

    Claude Code did the work — firmware, the bus protocol, the PIO, the expansion ROM in...

    Read more »

  • ALMOST FEATURE COMPLETE!

    Michael Wessel • 10/23/2026 at 07:00 • 0 comments

    New video: 

    One RP2350B doing the work of a shelf full of expansion cards. Here is what is running, all of it demonstrated in the video:

    • Speech. DECtalk voices, plus SP0256 emulation faithful enough that period software finds the hardware and talks — the animated vector head included, now running from a ROM instead of a disc.
    • The clock. A DS3231 that speaks the time, date and temperature, and can also be read into BASIC variables. |BIGCLOCK shows it in big digits using my own font from 1987, lifted out of ZAHLEN.BAS on an old MW-Soft disc — eleven glyphs of ten rows of seven, exactly the 770 bytes that program saved.
    • MIDI, both ways. Ultimate MIDI Card emulation and LambdaSpeak 3 style serial MIDI. ALF plays through it, and MIDI in drives the drum machine.
    • LambdaDrum. Eight voices, sample playback, driven from a BASIC drummer.
    • Amdrum. Write-driven 8-bit PCM, compatible with the original 1980s software — the real AmDrum.dsk runs.
    • MP3 playback through the serial module, with transport control.
    • ROM emulation. Four 16 KB slots in the card’s own flash, so a CPC carries four expansion ROMs on one board and they swap without a programmer or a PROM. There is a GUI uploader for them now: one pulldown per slot, the images offered by name, and a slot can be silenced if a ROM ever hangs the machine.

    A ROM of its own

    The card has its own expansion ROM, LAMBDASPEAK AI, with 53 RSX commands — speech, the voice modes, the settings and their getters, the clock, MP3, MIDI, the drum modes, Amdrum, the sample store, and |ROMUP, which lets a CPC reflash its own expansion ROM from BASIC.

    TFM’s original LambdaSpeak III ROM boots on the card too, and most of it works. Rather than port it, we decoded its whole command surface out of the ROM image — all 79 of its RSXs — and wrote a fresh one against the current protocol instead. The old one was built for 2021 conventions this card has deliberately moved on from, so a clean start made more sense than chasing compatibility.

    Credit where it is due

    Claude Code did most of the work here — firmware, protocol, the ROM, the tools, the documentation. I did the testing on real hardware, the steering, and a fair share of the ideas and diagnosis; several of the trickier bugs were found by me watching the CPC and saying “that is not what it should sound like”. It has been a genuinely good way to work on something this fiddly.

    What is next

    A bit of debugging first — |SAY from the new ROM still trips over a race in the card’s text handling, and a few of the 53 RSXs have not been exercised at all yet. Everything else in the video is real.

    After that, the two things I would most like on this board:

    • Disc emulation. The card already answers the expansion bus and already serves 16 KB ROM images out of its own flash, so a DSK on the Pico’s storage is a natural next step. The timing is the easy part; the data separator is where the work is.
    • PlayCity emulation, maybe. Two more AY chips and a CTC would give the CPC six extra sound channels, and this card is already mixing four sources in software — so it is more a question of bus cycles than of audio.

    Neither is a RetroChallenge-sized job, but the card has turned out to have room for both.

  • ROM Emulation working!

    Michael Wessel • 10/18/2026 at 18:58 • 0 comments

    By now, we also have ROM emulation working. LambdaSpeak AI can emulate the DK’tronics speech synth (SP0256-AL2), and it came with an RSX extension ROM providing BASIC RSX commands such as |say (Navy text-to-allophone rule-based algorithm). In addition, there are four more slots for arbitrary foreground / background ROMs; here with Boulder Dash. There is a simple Python client, and ROMs load over USB in ~1 second: 

  • RetroChallenge 2026/10 - Halftime Update

    Michael Wessel • 10/17/2026 at 03:47 • 0 comments

    HALFTIME: IT SPEAKS

    Thirteen days ago the boards were at the fab. Today the card said hello to a CPC 464, sang its own name, read out the date and temperature, played an MP3, and exchanged MIDI with a microKORG.

    It also has a new name. The silkscreen says LambdaSpeak AI now, which given how this project is being built seemed more honest than “4”.

    The day in one line

    A bare PCB at breakfast, a talking CPC by midnight. One day of bring-up cleared nine of the numbered steps in the test plan, leaving two:

    step
    1bLED bar, activity LEDs✅
    1cbuttons✅
    2banalog path, filter, trimmers, mixing✅
    3the CPC bus✅
    3bSOUND injection✅
    4speech — SSA-1 and DECtalk✅
    6serial / MP3✅
    6bMIDI in and out✅
    6c>td >✅
    5LambdaDrum—
    7ROM emulationwall hit, diagnosed

    The moment that mattered: PRINT INP(&FBEE) returning 128. That single number is cpc_bus.pio catching a real Z80 I/O cycle, decoding &FBEE off sixteen address lines, turning the ’245 around, putting the status byte on the bus and the Z80 reading it back — the entire job the CPLD used to do, running in PIO. Then OUT &FBEE,27:OUT &FBEE,7:OUT &FBEE,45:OUT &FBEE,53 — HH1 EH LL OW — and the card said “hello”.

    Six things that were wrong

    Nothing worked first time, and the failures are the interesting part.

    1. The data buffer was pointing the wrong way. U1‘s A side faces the connector, and a 74LVC245 sends A to B when DIR is high — so high means the CPC drives us, and low means we drive the CPC. The PIO had it inverted, so the card sat on the Z80’s data bus continuously. The 464 showed the grey screen of death and never reached BASIC. U1’s CE is tied to ground, so there is no high-Z to fall back on: direction is the only control there is.

    2. The read responder could never match an address. in pins, 16 with the ISR shifting right puts incoming data in the MSBs, leaving addr << 16 to be compared against a plain 0xFBEE. Every read took the skip branch. The write watcher uses the same setting harmlessly because it does in pins, 32, where a full-width IN fills the register either way — which is precisely why the two programs look consistent side by side.

    3. Four pins of U4 were not soldered. /IORQ, /RD, /WR and /ROMEN never reached the Pico at all, while /RSET on the pin right next to them worked perfectly. This one was found in software: a ‘245 output beats a 50 kΩ pull, so flipping the RP2350’s internal pull and watching whether the level follows separates “nothing is driving this pin” from “something is holding it”. Five lines of C turned “the bus doesn’t work” into “U4 pins 15 to 18” in one command, with no scope and no magnifier.

    4. The write watcher was drowning. It triggered on /WR, so it caught every memory write the Z80 did — four million of them — and sorted I/O from memory in software afterwards. The RX FIFO is four deep and discards silently when full, so an OUT to our port stood a good chance of being thrown away in the flood. The symptom was speech that dropped the odd allophone. Gating on /IORQ keeps memory cycles out entirely.

    5. ROMDIS was fighting the disk interface. With the card installed, the DDI-3’s Parados ROM vanished completely — cassette-only BASIC, no banner. U5 is push-pull, so it does not release ROMDIS, it holds it low for as long as the card is powered, and a 2.2 kΩ pull-down cannot lift a totem-pole output. The DDI-3 could never assert the line.

    The design notes had predicted this exact failure months ago, named the diode as the fix, and consciously decided not to spend the part because “stacking two ROM cards is unusual.” The very first machine this card met...

    Read more »

  • 10/13/2026: PCBs arrived - on time for the RC2026/10 halftime update!

    Michael Wessel • 10/13/2026 at 11:34 • 0 comments

    The PCB arrived from the fab - now it's time to bring it up. This is quite a bit of soldering, so I am not sure I can make it 'til the "halftime update" for the RetroChallenge by 10/15/2026, but I'll try! Latest, I should have it up and running the coming weekend. Stay tuned! Hopefully, there will be first YouTube video soon. If not - consider this log post my halftime update :-) 

  • Let the RC2026/10 Challenge begin!

    Michael Wessel • 10/03/2026 at 15:18 • 0 comments

    LET THE CHALLENGE BEGIN!

    RetroChallenge 2026/10 is three days old and the boards are already at the fab. That is either excellent planning or a sign that I am going to spend the other twenty-eight days debugging. Probably both.

    What LambdaSpeak 4 is

    LambdaSpeak 3 is a speech synthesizer, sample player, serial interface and real-time clock for the Amstrad CPC. It does all of that with a pile of increasingly hard-to-find silicon: an Epson S1V30120 running DECtalk v5, an SP0256-AL2 for the authentic 1980s robot voice, an ATmega644P to run the show, an XC9572 CPLD to decode the bus, and a 25LC1024 EEPROM for samples.

    LambdaSpeak 4 replaces every one of those with a single RP2350B module.

    LambdaSpeak 3, built todayLambdaSpeak 4
    board parts$80.78≈ $19
    off-board modules$42.00$7.00
    PCB$10.00$10.00
    total≈ $133≈ $37

    The difference is almost entirely five parts:

    $50U4 SP0256-AL2 — vintage, out of production. Emulated.
    $35Epson S1V30120 TTS click board. DECtalk in firmware.
    $7U1 ATmega644P, DIP-40
    $6 + $2.50U2 XC9572 CPLD and its PLCC-84 socket
    $2.50U3 25LC1024 EEPROM
    ≈ $103replaced by one $5 module

    A single SP0256-AL2 now costs more than an entire LambdaSpeak 4. At that price it is not a component any more, it is a collectible — which is the strongest argument there is for emulating it rather than socketing it.

    And it is not a like-for-like comparison in the other direction either: this card also does expansion-ROM emulation, LambdaDrum, and MIDI in and out.

    The division of labour

    This project is an experiment in working with an AI rather than just asking one for snippets, so it is worth being precise about who did what.

    Claude designed the electronics. The schematic is not drawn — it is generated. There is a Python file, netlist.py, that is the single authoritative description of what connects to what, and gen_sch.py turns it into a KiCad schematic with deterministic UUIDs, so regenerating never disturbs the board. Claude wrote both, plus the symbol library, the Core2350B and CPC-connector footprints, the firmware, and a checker, diff_netlist.py, that reads KiCad’s own netlist export back and compares it to netlist.py node for node. It has to say “MATCH — every net agrees” or something is wrong.

    That paid for itself repeatedly. Three examples that would all have been dead boards:

    • The 3-way DIP switch SW2 was wired as if poles were pins 1-2 and 3-4. They are numbered around the package — 1&6, 2&5, 3&4 — so as drawn, closing the first switch would have shorted the audio buffer output straight to ground.
    • D1‘s cathode went to a +5V net that reached one capacitor and nothing else, so the CPC’s supply would have stopped at a reservoir cap and the card would only ever have run on USB.
    • The MP3 module header was reversed. The manual lists the pins in one order and the module’s silkscreen in another; it took a photo of LambdaSpeak 3 and a read of its sources to settle which.

    I did the PCB layout. All of it — placement, the octagon outline, the silkscreen, the artwork. That is the part no generator was going to do, and honestly the part I enjoy most.

    And we argued about it a lot, which turned out to be the useful bit. More on that below.

    The board

    Two layers, 119.4 × 107.3 mm, 79 footprints, 131 nets, 1642 track segments, 122 vias, and a ground pour on both sides.

    Around the edges: MIDI IN and MIDI OUT on proper DIN sockets, a 3.5 mm line out, a 3.5 mm MP3 in, and the CPC MX4 edge connector along the bottom. The MP3 module and the DS3231 clock mount on the back, on headers, exactly as they did on LambdaSpeak 3.

    Across the top is the ten-segment LED bar — five segments of mode and five of level meter, both lit at once, which matters in Amdrum and LambdaDrum where...

    Read more »

View all 9 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates