pyampact.alignmentUtils.load_audiofile
- pyampact.alignmentUtils.load_audiofile(audio_file, mono_mode='mean')[source]
- Parameters:
audio_file (str) – The path to the wav file to be loaded.
- Returns:
audio_data (The loaded wav file as a numpy array.)
sr (The original sample rate of the audio file.)
Load WAV and (optionally) mix to mono while preserving loudness.
mono_mode –
“mean”: average channels (librosa-style; safest headroom) - do librosa.to_mono()
”equal_power”: sum channels and divide by sqrt(C) (~keeps perceived power)