AudioItem#
- class osekit.core.audio_item.AudioItem(file: AudioFile | None = None, begin: Timestamp | None = None, end: Timestamp | None = None, channels: list[int] | None = None)#
AudioItemcorresponding to a portion of anAudioFileobject.Initialize an
AudioItemfrom anAudioFileand begin/end timestamps.Parameters#
- file: osekit.data.audio_file.AudioFile
The
AudioFilein which this Item belongs.- begin: pandas.Timestamp (optional)
The timestamp at which this item begins. It is defaulted to
file.begin.- end: pandas.Timestamp (optional)
The timestamp at which this item ends. It is defaulted to
file.end.- channels: list[int]
Considered channels of the linked audio file.
- property channels: list[int]#
The channels targeted by this
AudioItem.
- get_value() ndarray#
Get the values from the File between the
beginandstoptimestamps.If the Item is empty, return a single
0.per channel.
- property nb_channels: int#
Number of channels targeted in the associated
AudioFile.
- property sample_rate: float#
Sample rate of the associated
AudioFile.
- property shape: tuple[int, int]#
Number of points in the audio item data.