Ahmed Doghri Logo Image
Ahmed Doghri

binauralbench

A clean stem can still put the instrument in the wrong place. binauralbench grades separation on spatial cues and cuts interaural-level error by 99.8%.

binauralbench reproduced benchmark result

A Good Stem Can Still Collapse The Room

Source separation is usually graded on signal distortion. For binaural audio, that misses whether the instrument stayed to the listener's left or snapped into the center.

binauralbench synthesizes a lateralized source with a known interaural level difference, then compares channel-collapsing separation with a linked stereo mask.

Grade The Spatial Cue

The benchmark measures ILD before and after separation. A mono mask can sound clean while deleting the cue; linked processing applies a shared decision without flattening channel energy.

Both output stems are written as stereo WAV files. Headphones make the metric's meaning immediately audible.

The Number

The target ILD is 8.20 dB. Naive separation collapses independently-estimated channel gains into one shared value and lands at 0.00 dB. Linked separation keeps each channel's own gain estimate, preserves 8.22 dB, and removes 99.8% of the spatial error.

This is a controlled cue-preservation test, not a perceptual listening study. The research link covers evaluation on MUSDB18-HQ and open HRTFs.

I Checked Whether It's One Lucky Pan

Worth being upfront about one thing first: that 0.00 dB naive score isn't really a measurement. Both naive output channels are computed as the exact same array (a shared average gain times the target), so their interaural level difference is mathematically guaranteed to be exactly zero, for any pan, any noise, any seed. That's not a hidden rigged baseline — the mechanism description above already explains why collapsing two channels into one shared gain destroys the cue by definition — but it means the naive number wasn't the part worth stress-testing.

The linked method's error-reduction claim was. I randomized target and interferer frequency, both channel gains, and noise level across 40 tuning configurations and a disjoint 30-seed holdout evaluated once, rejecting near-centered pans below 2 dB where relative error gets noisy for any method regardless of quality. The result held up: mean error reduction of 98.0%/98.4% on the two sweeps, never dropping below 85.6%. The published 99.8% wasn't a lucky pan — the mechanism generalizes.

Research Basis

Inspired by the 2025 binaural source-separation study. The portfolio number above comes from this repository's own controlled benchmark, not from the paper.

Tools Used

Python
Binaural Audio
Spatial DSP
Source Separation
Interaural Cues
Robustness Testing
unittest