dcase_framework.files.AudioFile.load

AudioFile.load(*args, **kwargs)[source]

Load file

Parameters:

filename : str, optional

File path Default value filename given to class constructor

fs : int

Target sampling frequency, if loaded audio does have different sampling frequency, audio will be re-sampled. Default value one given to class constructor

mono : bool

Monophonic target, multi-channel audio will be down-mixed. Default value one given to class constructor

res_type : str

Resample type, defined by Librosa Default value “kaiser_best”

start : float, optional

Segment start time in seconds Default value “None”

stop : float, optional

Segment stop time in seconds Default value “None”

Returns:

self

Raises:

IOError:

File does not exists or has unknown file format