maad.features.temporal_leq

maad.features.temporal_leq(s, fs, gain, Vadc=2, sensitivity=-35, dBref=94, dt=1)[source]

Computes the Equivalent Continuous Sound level (Leq) of an audio signal in the time domain.

Parameters:
s1D array of floats

audio to process (wav)

fsInteger

sampling frequency in Hz

gaininteger

Total gain applied to the sound (preamplifer + amplifier)

Vadcscalar, optional, default is 2Vpp (=>+/-1V)

Maximal voltage (peak to peak) converted by the analog to digital convertor ADC

sensitivityfloat, optional, default is -35 (dB/V)

Sensitivity of the microphone

dBrefinteger, optional, default is 94 (dBSPL)

Pressure sound level used for the calibration of the microphone (usually 94dB, sometimes 114dB)

dtfloat, optional, default is 1 (second)

Integration step to compute the Leq (Equivalent Continuous Sound level)

Returns:
LEQt: float

Equivalent Continuous Sound level (Leq) in dB SPL

Examples

>>> import maad
>>> s, fs = maad.sound.load('../data/spinetail.wav')
>>> Leq = maad.features.temporal_leq (s, fs, gain=42)
>>> print('Leq is %2.1fdB SPL' % Leq) 
Leq is 63.7dB SPL