cutcutcodec.core.classes.frame_audio¶
Defines the structure an audio frame.
Classes
|
An audio sample packet with time information. |
Details
- class cutcutcodec.core.classes.frame_audio.FrameAudio(time: Fraction | Real | str, rate: Integral, layout: Layout | str | Integral, data: Tensor | ndarray | Container, **kwargs)[source]
An audio sample packet with time information.
Behaves like a torch tensor of shape (nb_channels, samples). The shape is consistent with pyav and torchaudio. Values are supposed to be between -1 and 1 but no verification is done.
Attributes¶
- channelsint
The numbers of channels (readonly). For more informations about each channels, let see
self.layout.- layoutcutcutcodec.core.classes.layout.Layout
The signification of each channels (readonly).
- rateint
The frequency of the samples in Hz (readonly).
- samplesint
The number of samples per channels (readonly).
- timeFraction
The time of the first sample of the frame in second (readonly).
Initialise and create the class.
Parameters¶
- timeFraction
The time of the first sample of the frame in second.
- rateint
The frequency of the samples in Hz.
- layoutcutcutcodec.core.classes.layout.Layout or str or numbers.Integral
The canonical name of the layout, let see
cutcutcodec.core.classes.layout.Layoutfor the available layouts.- dataarraylike
Transmitted to
cutcutcodec.core.classes.frame.Frameinitialisator.- **kwargsdict
Transmitted to
cutcutcodec.core.classes.frame.Frameinitialisator.