lucianodato / libspecbleach

C library for audio noise reduction and other spectral effects
GNU Lesser General Public License v2.1
67 stars 12 forks source link

Quality/Latency tradeoff control? AKA Variable frame size #16

Closed unfa closed 2 years ago

unfa commented 7 years ago

AFAIK noise-repellent has a fixed latency.

I wonder if there could be a way to control the amount of delay somehow.

In some cases one could sacrifice some quality to get faster operation for semi-live usage like video live streaming or VoIP.

I have no idea if this is possible, so let me know.

lucianodato commented 7 years ago

It is possible, not sure how well it will work since I've never tried it. There's a setting in nrepel.c that defines the fft size (it's a #define macro). Right now is in 2048. With 128 for example it will introduce about 2 ms of latency. This setting should be a power of 2 to be cheap. Change it and let me know if it does work as you expected

lucianodato commented 7 years ago

I've been reading and zero or really small latency denoiser is really tricky to implement. Might require an entire new STFT approach just like explained in Adaptive time-frequency analysis for noise reduction in an audio filter bank with low delay. Really hard stuff out of my reach for now.

lucianodato commented 2 years ago

Mental note: Use sliding dft!

lucianodato commented 2 years ago

@unfa the new version has a separate plugin with lower latency. It makes sense because it doesn't need too much resolution for voice signals. Would this fulfill what you wanted here? Having it variable would be adding a lot of code for a feature that is not going to be that much used. Let me know what you think

unfa commented 2 years ago

Sure, that seems sufficient!