Documentation
Documentation
Documentation
What the system is made of, what each part does, and why it was chosen that way. Read it top to bottom in about six minutes, or jump to one part.
12 sections · ≈ 6 min
01SYSTEM
A hybrid DSP and neural noise suppressor that runs in real time on a microcontroller, keeping speech intelligible through gunfire, rotor noise, engines and sirens.
SNR
15dB
target, minimumTARGET
STOI
0.85
target, minimumTARGET
PESQ
2.5
target, minimumTARGET
Latency
Lowms
wireless linkTARGET
Classical noise suppression assumes the noise is stationary — that its spectrum barely changes from one frame to the next. Spectral subtraction, Wiener filtering and LMS-based active noise control all lean on that assumption, and they earn their keep on engine hum, rotor wash and road roar.
A gunshot breaks the assumption in a single frame. So does a door slam, a rotor blade passing the mic, a siren sweeping through the speech band. The estimator is still describing the noise from 30 ms ago, so it either fails to remove the event or, worse, removes the speech with it: pumping, musical noise and clipped consonants. In the field that is the difference between a readable transmission and a repeated one.
Three stages, each doing only what it is good at.
The whole chain runs on one microcontroller with no cloud, no phone and no companion DSP. What leaves the device is speech, on a wireless link with a 25 ms budget end to end.
02SYSTEM
Microphone to headset in one 10 ms frame, with a gate deciding whether the network is needed at all.
Mic pair
primary + reference
DSP prefilter
beamform · NLMS
SNR gate
SNR ≥ +5 dB ?
RNNoise
band gains, per frame
bypass — prefilter output passes through
Post-filter
pitch comb
Output
DAC → headset
Everything below happens once per 10 ms frame. The frame length is the unit of the whole system: the adaptive filter updates on it, the network's hidden state advances on it, and the latency budget is counted in it.
03BUILD
Two microphones, one microcontroller and a sealed case, sized to be worn rather than carried.
| MCU | NXPNXP MXCN236 | |
|---|---|---|
| Primary mic | Headset boomwired or wireless, close to the mouth | |
| Reference mic | Enclosure-mountedon or hanging from the case, facing the environment | |
| DAC / output | PCM5102Aconverter and headset drive stage | |
| Wireless link | 20 mslatency budget, end to end | TARGET |
| Enclosure | Airtight, 3D-printedcustom, in progress | IN PROGRESS |
| Power | 9.9mWIt can run on our battery for 3 days without charge. |
DRAG TO ROTATE
IN DEMO The firmware is written in C for the ARM core: a fixed 10 ms frame loop, DMA-fed microphone buffers and a static memory plan with no allocation after start-up. It runs the demo build end to end today; hardening is scheduled rather than done.
04BUILD
Beamforming and an NLMS adaptive filter remove the noise the reference microphone can predict.
The prefilter's job is to remove everything that can be removed by arithmetic alone, before any learned model is asked for an opinion.
Two microphones give it something to work with. Beamforming combines the pair to favour the direction of the mouth, which already rejects part of the field. What survives is handled by a normalised least mean squares adaptive filter: the reference channel is filtered to predict the noise present in the primary channel, and that prediction is subtracted. The filter's coefficients are updated every frame, so slowly drifting noise — an engine changing load, a rotor spinning up — is tracked without any explicit model of it.
05BUILD
A small recurrent network predicts one gain per frequency band, every frame, in int8.
The network follows the RNNoise design: instead of predicting a clean spectrum sample by sample, it predicts one gain per frequency band and applies it to the noisy spectrum. Bands follow a Bark-like spacing, so the output dimension stays small and the model never has to learn what speech sounds like — only which parts of the current frame are speech.
A gated recurrent unit carries the hidden state from frame to frame, which is what lets the model tell a consonant apart from a transient: both are broadband and brief, but only one is consistent with the last 200 ms of the signal. The hidden size is 128 units, and a new set of gains is produced every 10 ms.
The model is trained with int8 quantisation simulated in the loop: weights and activations are rounded to their deployment precision on every forward pass, while gradients still flow through in float. The model therefore learns weights that survive being rounded, and the int8 model that ships behaves like the float model that was evaluated.
| Model size | 600kbint8 weights, flash | DONE |
|---|---|---|
| RAM | 200kbactivations plus hidden state | DONE |
06BUILD
Once the noise is gone, the final challenge is keeping the voice stable, natural, and safe at the output.
AGC keeps the enhanced speech at a consistent listening level, while the soft clipper catches sudden peaks that are too fast for AGC to control.
The AGC continuously tracks the average output level and slowly adjusts the gain toward a target level. This compensates for level variations introduced by the microphone, NLMS adaptation, AI suppression, and comb filtering without causing audible pumping. The soft clipper operates at the final output, leaving normal signals untouched while smoothly rounding peaks above a threshold to prevent harsh digital clipping.
07BUILD
Training pairs are generated, not collected, so the SNR axis and the noise classes are ours to choose.
A generator that manufactures training pairs instead of collecting them. It follows the approach of MS-SNSD and extends the data pipeline that ships with RNNoise: clean speech is mixed with noise at a controlled signal-to-noise ratio, and both the mixture and the clean reference are kept, so every example comes with its own ground truth.
Generating rather than recording is what makes the SNR axis controllable. The same utterance can be emitted at −5, 0, +5 and +10 dB against the same gunshot, which is the only practical way to train a model that has to behave sensibly across that whole range.
Clean speech
corpus
Noise bank
impulsive · stationary · non-stationary
SNR sampler
target ratio per example
Mix + augment
reverb · clipping · gain
Pairs
(noisy, clean)
Features
bands + frame context
08BUILD
Losses chosen for impulsive noise, three metrics, and a model kept small enough for the target.
Training uses a perceptual loss over the band gains, combined with L1 and L2 terms on the error between the predicted and the ideal gain. L2 keeps the bulk of the mask close to correct; L1 stops a handful of badly wrong bands from being averaged away; the perceptual weighting decides which bands the error is worth spending capacity on.
All three are computed against the clean reference from the generated pairs, so they measure the model, not the recording.
| Optimiser | Adam |
|---|---|
| Learning rate | 0.001and schedule |
| Batch size | 64 |
| Epochs | 50and early-stopping criterion |
Reliable, intelligible voice communication for people working in the loudest places on earth, on hardware small enough to wear.
Noise is treated as a safety problem rather than an audio one. A transmission that has to be repeated costs seconds, and the situations this device is built for are the situations where seconds are expensive. The target is not a pleasant-sounding result; it is a result the listener does not have to ask about twice.
Dates are intent, not commitment. An item is only marked done once it runs in the demo build.
Prototype working on MCU
The full chain — prefilter, gate, network, post-filter — runs in real time on the target in the demo build.
Wireless headset link
Audio reaches the headset over the wireless link inside a 20 ms budget. The figure is a design target until it is measured end to end.
Custom 3D-printed airtight enclosure
Sealed case with the reference microphone mounted outside. Printing and fit are in progress; the STL follows.
Firmware hardening
C on the ARM core, with assembly on the hot paths: deterministic frame timing, static memory, no allocation after start-up.
Field evaluation with real recordings
Measure SNR, STOI and PESQ on recordings made in the environments the device is built for, rather than on generated pairs.