auditok.signal.calculate_energy_multichannel

auditok.signal.calculate_energy_multichannel(x, sample_width, aggregation_fn=<built-in function max>)[source]

Calculate the energy of multi-channel audio data. Energy is calculated channel-wise. An aggregation function is applied to the resulting energies (default: max). Also see calculate_energy_single_channel().

Parameters:
  • data (bytes) – single-channel audio data.
  • sample_width (int) – size in bytes of one audio sample (one channel considered).
  • aggregation_fn (callable, default: max) – aggregation function to apply to the resulting per-channel energies.
Returns:

energy – aggregated energy of multi-channel audio signal.

Return type:

float