neuralset.events.etypes.BaseSplittableEvent

pydantic model neuralset.events.etypes.BaseSplittableEvent[source][source]

Base class for dynamic events (audio and video) which can be read in parts.

Supports reading only a specific section [offset, offset + duration] of the file, enabling efficient partial loading of large media files.

Parameters:

offset (float, optional) – Start position within the file in seconds (relative to file start, not timeline) Default: 0.0

Notes

  • offset is relative to the event file, not the absolute timeline

  • The _split() method can divide an event into multiple sub-events

Examples

# Load only seconds 5-10 of an audio file
audio = Audio(start=100, timeline="t1", filepath="long_audio.wav",
             offset=5.0, duration=5.0)
audio_data = audio.read()  # Only loads 5 seconds
Fields:
field offset: Annotated[float, Ge(ge=0)] = 0.0[source]
requirements: tp.ClassVar[tuple[str, ...]] = ()[source]
type: tp.ClassVar[str] = 'BaseSplittableEvent'[source]