Audio Classes

class dsdtools.audio_classes.Source(name=None, path=None)[source]

Bases: object

An audio Target which is a linear mixture of several sources

Attributes

name (str) Name of this source
path (str) Absolute path to audio file
gain (float) Mixing weight for this source
audio

array_like: [shape=(num_samples, num_channels)]

rate

int: sample rate in Hz

class dsdtools.audio_classes.Target(sources)[source]

Bases: object

An audio Target which is a linear mixture of several sources

Attributes

sources (list[Source]) list of Source objects for this Target
audio

array_like: [shape=(num_samples, num_channels)]

mixes audio for targets on the fly

class dsdtools.audio_classes.Track(filename, track_id=None, track_artist=None, track_title=None, subset=None, path=None)[source]

Bases: object

An audio Track which is mixture of several sources and provides several targets

Attributes

name (str) Track name
path (str) Absolute path of mixture audio file
subset ({‘Test’, ‘Dev’}) belongs to subset
targets (OrderedDict) OrderedDict of mixted Targets for this Track
sources (Dict) Dict of Source objects for this Track
audio

array_like: [shape=(num_samples, num_channels)]

rate

int: sample rate in Hz