auditok.signal.to_array¶
-
auditok.signal.
to_array
(data, sample_width, channels)[source]¶ Extract individual channels of audio data and return a list of arrays of numeric samples. This will always return a list of array.array objects (one per channel) even if audio data is mono.
Parameters: - data (bytes) – raw audio data.
- sample_width (int) – size in bytes of one audio sample (one channel considered).
Returns: samples_arrays – list of arrays of audio samples.
Return type: list