essentia
essentia copied to clipboard
Change default behaviour of `silentFrames` (streaming) FrameCutter
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.
This is a way to make noise adder inside FrameCutter deterministic: https://github.com/MTG/essentia/issues/1192#issuecomment-949062652.
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.