Skip to main content

load_audio

Function load_audio 

Source
pub fn load_audio(path: &Path, target_sr: u32) -> Result<AudioData>
Expand description

Load an audio file, convert to mono, and resample to target_sr.

Supports MP3, WAV, FLAC, OGG, and other formats via symphonia. Uses high-quality sinc resampling via rubato when the source rate differs from target_sr.