University of Melbourne · with Christopher Loo
Real-time speech separation
Awards won: Best Project in Electrical and Electronic Engineering · Airwallex award for Social Impact through Innovation
Special thank you to Professor Erik Weyer for his help and support as supervisor and to Analog Devices and Robert Slaviero for kindly providing the MAX78000FTHR development board for this project.
I designed and trained a convolutional neural network to separate overlapping voices in real-time on the MAX78000 microcontroller. As far as we know, this is the first deployment of a network that solves the cocktail party problem in real-time on hardware. The accelerator’s supported operations, memory and timing budget heavily constrained the design.

The cocktail party problem
The cocktail party problem is the challenge of separating and understanding multiple overlapping conversations or sound sources recorded at the same time, much as a listener at a crowded party tries to focus on one speaker while ignoring the surrounding noise. In signal processing and machine learning, this problem is often addressed using techniques such as blind source separation, which infer the original sources from their mixed signals.
Modern deep learning techniques produce remarkably strong results on this problem offline and on unconstrained hardware. In this project, we attempt blind source separation on heavily constrained hardware in real-time. It is not just a simple matter of porting large networks, such as Conv-Tasnet or Demucs, onto hardware because (a) they wouldn't fit within the memory budget of the hardware and (b) they are not designed for real-time and would not be able to 'keep up' with streaming input.
For our problem, the input was a single audio channel containing two speakers. Our task was to recover one voice while keeping up with incoming audio at an 8 kHz sample rate.
I owned the design of the neural architecture, training, quantisation-aware training, accelerator memory mapping and neural-network evaluation. Christopher Loo led the audio firmware and investigated classical separation methods. Integration and the working prototype were team achievements.
Designing for the chip
I started from Conv-TasNet, which learns a representation of the waveform, separates features and decodes them back into audio. On the MAX78000, the available operations limited how each stage could work.
Conv-TasNet contribution to the literature was to separate speech directly from the time-domain waveform, rather than a frequency-domain representation. This has a few advantages: one of which is that the phase information is not lost and is available to the network to form its features. A learned convolutional encoder turns short segments of audio into a set of features. A separator then uses dilated temporal convolutions to recognise patterns across time and estimate which features belong to each speaker. Increasing the dilation lets the network use a wider temporal context without requiring large convolution kernels. This allows the network to get a context that is large enough for phoneme recognition which last an average of 100 ms.
In the original architecture, the separator produces a mask for each speaker. Each mask multiplies the encoded mixture to retain that speaker’s features, which a learned decoder converts back into a waveform that is trained to be one of the original speakers.
Conv-TasNet has 24 separator blocks arranged in three stacks of eight, with 256 channels and approximately 5.1 million parameters. Within each stack, increasing dilation expands the temporal context. Repeating the stack adds further processing, while skip connections combine features from different depths before mask estimation.
For the MAX78000, I reduced the separator to one stack of eight blocks and 64 channels. Together with the architectural changes and 8-bit quantisation-aware training, this produced a model with approximately 103,000 parameters: about 50 times fewer than the baseline.
The changes went beyond reducing width and depth. Standard Conv-TasNet uses depthwise-separable convolutions, which filter each channel independently before mixing information across channels with a pointwise convolution. The MAX78000 does not support that operation directly, so I used dense convolutions that map to its accelerator.
The accelerator also lacks the elementwise multiplication needed for conventional feature masking. I used a linear encoder and subtracted a learned complementary representation from the encoded mixture before decoding. This retained the encoder–separator–decoder structure using supported operations. The effect of subtraction on separation quality was not isolated experimentally.
Padding restrictions shaped the temporal convolutions. I used valid convolutions, which progressively shorten the sequence: 640 input samples produce 128 output samples. The window supplies 512 samples of context, symmetric around the future and past. Adding a ninth block at the next dilation would have required 1,152 input samples, exceeding the accelerator’s input limit.
The hardware is limited to 32 layers, including cropping and elementwise operations alongside convolutions. The resulting network uses 29 of the available 32 layers. Retaining the original cross-block skip accumulation would raise that count to 37, so I removed it while preserving the residual connections within each block.
These choices made deployment feasible, with reported accelerator inference of 8.7 ms inside the 16 ms processing period. They also reduced model capacity. The available evaluation measures the combined result of these changes and does not allow us to comment on the individual accuracy cost of each compromise.
Keeping up with real-time audio
The network uses 256 samples of past context and 256 samples of lookahead around each output block. That future context introduces 32 ms of lookahead. This is streaming separation with delay.
We achieved 8.7 ms of accelerator inference at 50 MHz, within the 16 ms processing period. That timing covers the CNN execution. This leaves plenty of headroom for the rest of the audio pipeline which we conservatively estimate at less than 2 ms.
Tracing a deployment fault
When the board output diverged from the model, I compared the same input through the training reference, the quantised model and the hardware. This involved detailed tracing of the intermediate-layer outputs and comparisons with original PyTorch output, quantised model output, and synthesised C code output to identify where in the synthesisation pipeline errors were being introduced. This systematic debugging process identified an error in the synthesised C code output where intermediate layer outputs that involved dilated convolutions with interleaved SRAM memory mapping diverged from the known answer.
After ruling out a bug in my implementation of the SRAM mapping of the layer activations, I dove into the Analog Devices SDK synthesiser code and followed through how it handled dilated convolutions. The synthesiser adjusted its output write pointer to discard invalid samples from dilated convolutions. That adjustment assumed contiguous writes. With interleaved writes, each step advanced twice as far, so valid samples landed beyond their declared address. I corrected the adjustment to account for the actual write spacing.
After the fixes, the report records a mean absolute error of 1.45 least significant bits across one 128-sample output, with 89% of samples within ±3. For signed 8-bit samples, that mean error corresponds to approximately −38.9 dBFS. We accepted this as approximate agreement for the tested input.
What the results establish
- Accelerator inference
- 8.7 ms
- Offline separation
- 5.16 ± 4.38 dBSI-SDR · mean ± standard deviation · 3,000 clean mixtures
The separation score was evaluated offline using longer PyTorch windows on held-out test data. It measures similarity to a reference speaker while allowing for scale differences. It does not quantify separation through the complete streaming-board pipeline, and the large standard deviation shows substantial variation between mixtures. When we listened to the samples with good vs bad separation, we found that speakers with differing spectral characteristics (male vs female) and differing timing produced much better results than those that were similar and overlapped a lot.
While this result was not incredible separation from an auditory perspective, when compared to an ablation study of Conv-TasNet style models in the literature (Ali et al., 2023), our model achieves roughly the expected dB separation for a model of its size. Furthermore, this provides a benchmark as the first of its kind in real-time on hardware.
Noise, reverberation and additional speakers remain unvalidated. The training objective permits either speaker as output; it does not select a desired person.
Report: architecture pp. 14–19; deployment pp. 19–23; results pp. 23–26. Contribution and evaluation details include author clarifications.