essentia icon indicating copy to clipboard operation
essentia copied to clipboard

Change default behaviour of `silentFrames` (streaming) FrameCutter

Open Bomme opened this issue 3 years ago • 2 comments

The default behaviour of the FrameCutter algorithm adds noise to silent frames. This can lead to problems with reproducibility and can be unexpected by users since the standard FrameCutter does not have this option.

In the code there is a comment that explains this design choice.

// Adding noise to avoid divisions by zero (in case the user chooses to do so
  // by setting the silentFrames parameter to ADD_NOISE).  The level of such noise
  // is chosen to be -100dB because it will still be detected as a silent frame
  // by essentia::isSilent() and is unhearable by humans

I propose to change the default value of silentFrames to keep. This would be a breaking change of the API though.

Bomme avatar Nov 02 '21 20:11 Bomme

This is a way to make noise adder inside FrameCutter deterministic: https://github.com/MTG/essentia/issues/1192#issuecomment-949062652.

dbogdanov avatar Nov 03 '21 10:11 dbogdanov

I agree with @Bomme. Probably modifying the API behaviour is not that problematic given that the current default is not deterministic. What concerns me more are the extractor algorithms depending on streaming FrameCutter that could produce zero divisions after this change. We should identify those algorithms and explicitly set the add_noise option.

palonso avatar Nov 04 '21 15:11 palonso