spdl.io.AudioPackets

class AudioPackets[source]

Packets object containing audio samples.

Methods

clone()

Clone the packets, so that data can be decoded multiple times.

Attributes

num_channels

The number of channels.

sample_rate

The sampel rate of the audio.

timestamp

The window this packets covers, denoted by start and end time in second.

clone() AudioPackets[source]

Clone the packets, so that data can be decoded multiple times.

Returns:

A clone of the packets.

property num_channels: int[source]

The number of channels.

property sample_rate: int[source]

The sampel rate of the audio.

property timestamp: tuple[float, float] | None[source]

The window this packets covers, denoted by start and end time in second.

This is the value specified by user when demuxing the stream.