dcase_models.data.WhiteNoise

class dcase_models.data.WhiteNoise(snr)[source]

Bases: object

Implements white noise augmentation.

The structure is similar to sox.Transformer in order to keep compatibility with sox.

Parameters:
snr : float

Signal to noise ratio.

__init__(snr)[source]

Initialize the white noise.

Methods

__init__(snr) Initialize the white noise.
build(file_origin, file_destination) Add noise to the file_origin and save the result in file_destination.
build(file_origin, file_destination)[source]

Add noise to the file_origin and save the result in file_destination.

Parameters:
file_origin : str

Path to the source file.

file_destination : str

Path to the destination file.