Audio class - Quefumas/gensound GitHub Wiki
TODO
Basically a wrapper for numpy.ndarray object, with shape being (num_channels, num_samples), data type numpy.float64.
Some properties are described below, but note that this won't necessarily reflect recent changes in code, so you are encouraged to read the code instead.
Audio.audio- thendarraywith the audio data, as aboveAudio.num_channelsAudio.length- returns number of samplesAudio.duration- returns duration in ms (float)Audio.shape- returnsAudio.audio.shapeAudio.to_length(self, length)- ensures has at leastlengthsamples, padding with zeros if needed. Does not crop.Audio.extend(self, how_much)- always addshow_muchzero samples at the end.