carat.features.accentuation_feature

carat.features.accentuation_feature(signal, fs, sum_flag=True, log_flag=False, mel_flag=True, alpha=1000, maxfilt_flag=False, maxbins=3, **kwargs)[source]

Compute accentuation feature from audio signal.

Based on the log-power Mel spectrogram [1].

[1] Böck, Sebastian, and Gerhard Widmer.
“Maximum filter vibrato suppression for onset detection.” 16th International Conference on Digital Audio Effects, Maynooth, Ireland. 2013.

This performs the following calculations to the input signal:

input->STFT->(Mel scale)->(Log)->(Max filtering)->Diff->HWR->(Sum)

Parenthesis denote optional steps.

Args:
  • input: signal
  • fs: sampling rate
  • sum_flag (bool): true if the features are to be summed for each frame.
  • log_flag (bool): true if the features energy are to be converted to dB.
  • mel_flag (bool): true if the features are to be mapped in the Mel scale.
  • alpha (int): compression parameter for dB conversion - log10(alpha*abs(S)+1).
  • maxfilt_flag (bool): true if a maximum filtering is applied to the feature.
  • maxbins (int): number of frequency bins for maximum filter size
  • **kw : these keyword arguments are passed down to each of the functions used
Returns:
  • feature (numpy array): feature values
  • time (numpy array): time values