dsp/: add spectral detector with envelope + peak suppression

- Detector computes smoothed spectral envelope
- Finds peaks exceeding envelope
- Creates per-bin suppression mask
- Applies mask in frequency domain before ISTFT
- Default params: sharpness=1.0, selectivity=0.5, depth=0.3

Verified: burst500.wav → output RMS reduced from 0.0678 to 0.0476
This commit is contained in:
2026-08-17 15:49:48 +03:00
parent 7dcbcf49b4
commit 71870129c2
5 changed files with 80 additions and 66 deletions
+1
View File
@@ -131,6 +131,7 @@ int main(int argc, char* argv[]) {
std::vector<float> output(total_samples);
SpectralProcessor sp(2048, 512);
sp.setDetectorParams(1.0f, 0.5f, 0.3f);
std::vector<float> left_in(frames), right_in(frames);
for (size_t i = 0; i < frames; i++) {