Load audio file metadata for creating physical timelines.
AudioLoader extracts metadata from audio files without loading the actual sample data. This is efficient for creating DiscretePhysicalTimelines that represent audio files in the TimeToAlign! framework.
The loader automatically: - Detects the best available backend (soundfile > mutagen > wave) - Extracts sample count, sample rate, channels, and format info - Provides methods to create timelines with appropriate C-maps
Supported formats depend on installed backends: - soundfile: WAV, FLAC, OGG, AIFF, and many more (via libsndfile) - mutagen: MP3, M4A, FLAC, OGG (metadata only, may not have exact sample count) - wave (builtin): WAV only
>>># The timeline has a SamplesToSeconds C-map attached>>>from timetoalign.core import TimeUnit>>> timeline.get_timestamp(44100).get_unit(TimeUnit.seconds)1.0