maad.features.temporal_moments
- maad.features.temporal_moments(s, fs=None, roi=None)[source]
Computes the first 4th moments of an audio signal, mean, variance, skewness, kurtosis.
- Parameters:
- s1D array
Audio to process
- fsfloat, optional
Sampling frequency of audio signal The default is None
- roipandas.Series, optional
Region of interest where peak frequency will be computed. Series must have a valid input format with index: min_t, min_f, max_t, max_f. The default is None.
- Returns:
- meanfloat
mean of the audio
- varfloat
variance of the audio
- skewfloat
skewness of the audio
- kurtfloat
kurtosis of the audio
Examples
>>> from maad import sound, features >>> s, fs = sound.load('../data/spinetail.wav') >>> sm, sv, ss, sk = features.temporal_moments (s, fs) >>> print('mean: %2.2f / var: %2.5f / skewness: %2.4f / kurtosis: %2.2f' % (sm, sv, ss, sk)) mean: -0.00 / var: 0.00117 / skewness: -0.0065 / kurtosis: 24.71