-
Notifications
You must be signed in to change notification settings - Fork 6
Audio class
Quefumas edited this page Feb 20, 2021
·
1 revision
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
- thendarray
with the audio data, as above Audio.num_channels
-
Audio.length
- returns number of samples -
Audio.duration
- returns duration in ms (float) -
Audio.shape
- returnsAudio.audio.shape
-
Audio.to_length(self, length)
- ensures has at leastlength
samples, padding with zeros if needed. Does not crop. -
Audio.extend(self, how_much)
- always addshow_much
zero samples at the end.