auditok.signal.separate_channels

auditok.signal.separate_channels(data, fmt, channels)[source]

Create a list of arrays of audio samples (array.array objects), one for each channel.

Parameters:
  • data (bytes) – multi-channel audio data to mix down.
  • fmt (str) – format (single character) to pass to array.array to convert data into an array of samples. This should be “b” if audio data’s sample width is 1, “h” if it’s 2 and “i” if it’s 4.
  • channels (int) – number of channels of audio data.
Returns:

channels_arr – list of audio channels, each as a standard array.array.

Return type:

list