pydiogment.auga

  • Description: amplitude based augmentation techniques/manipulations for audio data.
pydiogment.auga.add_noise(infile, snr)[source]

Augment data using noise injection.

Note:
It simply add some random values to the input file data based on the snr.
Args:
  • infile (str) : input filename/path.
  • snr (int) : signal to noise ratio in dB.
pydiogment.auga.apply_gain(infile, gain)[source]

Apply gain to infile.

Args:
  • infile (str) : input filename/path.
  • gain (float) : gain in dB (both positive and negative).
pydiogment.auga.fade_in_and_out(infile)[source]

Add a fade in and out effect to the audio file.

Args:
  • infile (str) : input filename/path.
pydiogment.auga.normalize(infile, normalization_technique='peak', rms_level=0)[source]

Normalize the signal given a certain technique (peak or rms).

Args:
  • infile (str) : input filename/path.
  • normalization_technique (str) : type of normalization technique to use. (default is peak)
  • rms_level (int) : rms level in dB.