class_docstr: Additive background noise deformations.
  
  From each background noise signal, `n_samples` clips are randomly
  extracted and mixed with the input audio with a random mixing coefficient
  sampled uniformly between `weight_min` and `weight_max`.
  
  This transformation affects the following attributes:
  
  - Audio
  
  Attributes
  ----------
  n_samples : int > 0
      The number of samples to generate with each noise source
  
  files : str or list of str
      Path to audio file(s) on disk containing background signals
  
  weight_min : float in (0.0, 1.0)
  weight_max : float in (0.0, 1.0)
      The minimum and maximum weight to combine input signals
  
      `y_out = (1 - weight) * y + weight * y_noise`
  
  rng : None, int, or np.random.RandomState
      The random number generator object or seed.
  
      If None, `np.random` is used.
  
      If int-typed, the `rng` value is used as a seed for the random number
      generator.
class_docstr_tok: ["Additive","background","noise","deformations",".","From","each","background","noise","signal",",","`","n_samples","`","clips","are","randomly","extracted","and","mixed","with","the","input","audio","with","a","random","mixing","coefficient","sampled","uniformly","between","`","weight_min","`","and","`","weight_max","`",".","This","transformation","affects","the","following","attributes",":","-","Audio","Attributes","--","--","--","--","--","n_samples",":","int",">","0","The","number","of","samples","to","generate","with","each","noise","source","files",":","str","or","list","of","str","Path","to","audio","file","(","s",")","on","disk","containing","background","signals","weight_min",":","float","in","(","0.0",",","1.0",")","weight_max",":","float","in","(","0.0",",","1.0",")","The","minimum","and","maximum","weight","to","combine","input","signals","`","y_out","=","(","1","-","weight",")","*","y","+","weight","*","y_noise","`","rng",":","None",",","int",",","or","np.random.RandomState","The","random","number","generator","object","or","seed",".","If","None",",","`","np.random","`","is","used",".","If","int-typed",",","the","`","rng","`","value","is","used","as","a","seed","for","the","random","number","generator","."]
code: def __init__(
      self,
      n_samples=1,
      files=None,
      weight_min=0.1,
      weight_max=0.5,
      rng=None,
  ):
      if n_samples <= 0:
          raise ValueError("n_samples must be strictly positive")
  
      if not 0 < weight_min < weight_max < 1.0:
          raise ValueError("weights must be in the range (0.0, 1.0)")
  
      if isinstance(files, six.string_types):
          files = [files]
  
      for fname in files:
          if not os.path.exists(fname):
              raise RuntimeError("file not found: {}".format(fname))
  
      BaseTransformer.__init__(self)
  
      self.n_samples = n_samples
      self.files = files
      self.weight_min = weight_min
      self.weight_max = weight_max
      self.rng = rng
      self._rng = _get_rng(rng)
  
file_path: muda/muda/deformers/background.py
imports: import soundfile
  import librosa
  import numpy
  import os
  import six
  from ..base import BaseTransformer, _get_rng
label_desc: Use image node_id 1 to create a new BackgroundNoise object from inherited base classes: BaseTransformer with example: obj = BackgroundNoise(n_samples, files, weight_min, weight_max, rng)