audioflux.read
- audioflux.read(path=None, dir=None, is_mono=True, samplate=None, re_type='scipy')
Load an audio file as a NumPy array of floats.
- Parameters
- path: str or list
Audio file path or path list.
If list, the sampling rate and audio length of all audio files must be the same
- dir: str
Audio file directory.
If you set the directory, the path parameters cannot work.
The sampling rate and audio length in the directory must be the same.
- is_mono: bool
Whether to convert it into a single channel
- samplate: int or None
Convert audio sampling rate. None defaults to use audio
- re_type: str
Resample type
scipy: scipy.signal.resample
scipy_poly: scipy.signal.resample_poly
- Returns
- y: np.ndarray [shape=(…, n)]
audio time series.
- sr: number > 0 [scalar]
sampling rate of y