AudioItem#
- class osekit.core_api.audio_item.AudioItem(file: AudioFile | None = None, begin: Timestamp | None = None, end: Timestamp | 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.
- 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 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.