espnet3.systems.esp2_enh.metrics.sisnr.load_audio
Less than 1 minute
espnet3.systems.esp2_enh.metrics.sisnr.load_audio
espnet3.systems.esp2_enh.metrics.sisnr.load_audio(path: str | Path, sample_rate: int | None = None) → ndarray
Load mono audio and optionally resample it.
Also used by the PESQ and STOI metrics in this package.
Multi-channel files use the first (reference) channel rather than averaging.
- Parameters:
- path – Path to a waveform file.
- sample_rate – Target sampling rate. If omitted, keep the original rate.
- Returns: A one-dimensional
float32waveform.
