dcase_util.containers.AudioContainer.load

AudioContainer.load(filename=None, fs='native', mono=False, res_type='kaiser_best', start=None, stop=None, auto_trimming=False)[source]

Load file

Parameters
filenamestr, optional

File path, if None given filename parameter given to class constructor is used.

fsint or str

Target sampling frequency, if loaded audio does have different sampling frequency, audio will be re-sampled. If None given, value given to class constructor is used. If ‘native’ is given then native sampling frequency defined by audio file is used. Default value ‘native’

monobool

Monophonic target, multi-channel audio will be down-mixed. Default value False

res_typestr

Resample type, defined by Librosa. Default value ‘kaiser_best’

startfloat, optional

Segment start time in seconds. Default value None

stopfloat, optional

Segment stop time in seconds. Default value None

auto_trimmingbool

In case using segment stop parameter, the parameter is adjusted automatically if it exceeds the file duration. Default value False

Returns
self
Raises
IOError:

File does not exists or has unknown file format