maad.features.all_temporal_features

maad.features.all_temporal_features(s, fs, nperseg=1024, roi=None, display=False, **kwargs)[source]

Compute all the temporal features for a signal.

Parameters:
s1D array

Input audio signal

fsfloat

Sampling frequency of audio signal

npersegint, optional

Length of segment to compute the FFT. The default is 1024.

roipandas.Series, optional

Region of interest where temporal features will be computed. Series must have a valid input format with index: min_t, min_f, max_t, max_f. The default is None.

kwargsadditional keyword arguments

If window=’hann’, additional keyword arguments to pass to sound.spectrum.

Returns:
temporal_featurespandas DataFrame

DataFrame with all temporal features computed in the spectrum

Examples

>>> from maad import features, sound
>>> s, fs = sound.load('../data/spinetail.wav')

Compute all the temporal features

>>> temporal_features = features.all_temporal_features(s,fs)
>>> print(temporal_features.iloc[0])
sm            -2.043264e-19
sv             1.167074e-03
ss            -6.547980e-03
sk             2.471161e+01
Time 5%        1.219048e+00
Time 25%       5.712109e+00
Time 50%       1.181896e+01
Time 75%       1.655583e+01
Time 95%       1.775166e+01
zcr            1.050040e+04
duration_50    1.001495e+01
duration_90    1.654441e+01
Name: 0, dtype: float64