lucianodato / libspecbleach

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

Implement FFT partitioning to reduce latency #42

Open SimonG4ELI opened 2 years ago

SimonG4ELI commented 2 years ago

Hi,

I see the frame size is 20ms. If latency and CPU load are not a problem, is there an advantage in using a much bigger frame size, for example 160ms?

lucianodato commented 2 years ago

Right, so yeah that's an option if you want better resolution in the lower frequencies at the expense of more latency. Evidently you already know how to change it. I think here would be a good use of exposing these parameters through a config file

SimonG4ELI commented 2 years ago

How about an extra parameter in the specbleach_adaptive_initialize call?

lucianodato commented 2 years ago

Yeah I kinda make sense just for this one. In the future I plan to use a multiresolution fft which would get rid of this issue. Will depend on how efficient my implementation is though

SimonG4ELI commented 2 years ago

Sounds interesting...

lucianodato commented 2 years ago

Do you mind if I change the issue name so it's clear it's a request? To something like Expose frame size configuring possibly through the api

SimonG4ELI commented 2 years ago

Sure, rename it as you wish

SimonG4ELI commented 2 years ago

Right, so yeah that's an option if you want better resolution in the lower frequencies at the expense of more latency. Evidently you already know how to change it. I think here would be a good use of exposing these parameters through a config file

In my software's filtering I use FFT Partitioning - I'm sure we could use this to reduce latency, for example I can reduce the latency of 128ms down to 4ms.

lucianodato commented 2 years ago

Ahh yeah someone el se has mentioned this once. I'll investigate further, this will be for sure useful!

SimonG4ELI commented 2 years ago

Ahh yeah someone el se has mentioned this once. I'll investigate further, this will be for sure useful!

Uses more CPU but at these sample rates will not be an issue.