pydiogment.augf

  • Description: frequency based augmentation techniques/manipulations for audio data.
pydiogment.augf.apply_filter(infile, filter_type, low_cutoff_freq, high_cutoff_freq=None, order=5)[source]

Apply a certain type of Buttenworth filter on the input audio.

Args:
  • infile (str) : input audio filename.
  • filter_type (str) : type of the filter to apply.
  • low_cutoff_freq (float) : the low cut-off frequency of the filter.
  • high_cutoff_freq (float) : the high cut-off frequency of the filter.
  • order (int) : filter order to define its accuracy.
pydiogment.augf.change_tone(infile, tone)[source]

Change the tone of an audio file.

Args:
  • infile (str) : input audio filename.
  • tone (int) : tone to change.
pydiogment.augf.convolve(infile, ir_fname, level=0.5)[source]

Apply convolution to infile using the given impulse response file.

Args:
  • infile (str) : input filename/path.
  • ir_fname (str) : name of impulse response file.
  • level (float) : can be between 0 and 1, default value = 0.5