home

DSR Pipeline Graph

1
Core InputHandler.cpp

Input Handler & Resampler

Sinc-resample + PCM decode

Decodes multi-channel raw PCM bytes, extracts 6 circular mic channels + 2 loopback reference channels, and applies Sinc-Kaiser resampling to 16 kHz.

Format 8ch → 16 kHz
2
DSP AutoGainMatcher.cpp

Auto Gain Matcher

EMA RMS Level Matching

Scales the loopback reference to match mic energy before AEC. After spatial, learns stereo gain when playback / correlation conditions are met.

Smoothing α 0.15
3
DSP ReferenceExtractor.cpp

Reference Extractor

Differential Stereo Decoder

Builds a mono reference from the loopback pair, validates presence, and gates low-energy reference so AEC does not adapt on silence.

Ref Gate 0.0010 RMS
4
DSP Hpf.cpp

High-Pass Filter

2nd-order Butterworth IIR

Applied before AEC on all mic channels and the matched mono reference. Removes sub-120 Hz rumble / motor noise.

Cutoff 120 Hz
5
DSP MdfAec.cpp

MDF Classical AEC

Multi-Delay Frequency Adaptive

Linear frequency-domain AEC on all mic channels when echo-path correlation is plausible. Skipped on double-talk-dominated or inactive reference.

Engage corr gated
6
Spatial NearendActivity.cpp

Nearend Activity

Energy Nearend Detector

Per-block nearend vs playback-only gate from mic/ref RMS and echo correlation. Drives MVDR SCM updates and AGC masks only. The gate itself uses no direction information.

Outputs human / playback
7
Spatial OnlineWpe.cpp

WPE Dereverberation

Online recursive-RLS MIMO

Linear, distortionless removal of LATE reverberation, per frame per bin, inside the shared STFT pair so it adds no latency. ON BY DEFAULT since 2026-08-22; fails closed to passthrough.

Default ON · −26.8 % WER
8
Spatial OnlineMvdrBeamformer.cpp

Online MVDR Beamformer

Geometry-blind SCM MVDR

Online MVDR with speech/noise SCMs. Nearend applies beamformed output; playback-only adapts the noise SCM but emits equal-mix. Geometry-blind: SRP-PHAT DOA observes Phi_ss and never steers it.

Channels 6-ch → 1-ch
9
NS ResidualEchoSuppressor.cpp

Residual Echo Suppressor

Per-bin, before synthesis

Suppresses what the linear AEC leaves behind — the residual is loudspeaker nonlinearity, so the linear ceiling is ~11–13 dB. Per bin and coherence-driven, so double-talk speech survives instead of being ducked along with the whole spectrum.

Owns echo ducking
10
NS NoiseFloorTracker.cpp

Noise Floor Tracker

Inside processMono()

Tracks ambient noise RMS on the mono stream after synthesis; feeds Adaptive AGC inside EchoAndGainModule::processMono. Its only remaining consumer is the AGC.

Mode Adaptive EMA
11
Output AdaptiveAgc.cpp

Adaptive AGC

Target RMS Gain Controller

Speech-aware gain toward a target RMS, using the noise floor, voice probability and the nearend gate. Owns output level end to end; it is the only stage that sets level.

Context playback / nearend
12
Output PcmUtils.cpp

S16LE Encoder

Pure conversion + clip guard

Float → S16LE at full scale. Applies NO gain: no normalisation, boost, peak tracking or slew — a second gain stage with its own time constant would fight the AGC and pump the level.

encode_gain 1.000 (no-op)