audiblelight.augmentation.TimeWarpRemove

audiblelight.augmentation.TimeWarpRemove#

class audiblelight.augmentation.TimeWarpRemove(sample_rate=44100, fps=None, prob=None)#

Bases: TimeWarp

Applies a time-warping effect (silence) to the audio.

This effect uses the following method:
  • Split audio into frames, according to FPS value

  • Iterate over all frames
    • Sample a random value x

    • if x < prob:
      • Remove the frame

Parameters:
  • sample_rate (int | float | complex | integer | floating | None)

  • fps (int | float | complex | integer | floating | DistributionLike | None)

  • prob (int | float | complex | integer | floating | DistributionLike | None)

__init__(sample_rate=44100, fps=None, prob=None)#
Parameters:
  • sample_rate (int | float | complex | integer | floating | None)

  • fps (int | float | complex | integer | floating | DistributionLike | None)

  • prob (int | float | complex | integer | floating | DistributionLike | None)

Methods

__init__([sample_rate, fps, prob])

from_dict(input_dict)

Initialise an augmentation from a dictionary.

process(input_array)

Calls the underlying FX (or a list of FX)

sample_value(override, default_dist)

Samples a value according to the following method:

to_dict()

Returns the parameters used by this augmentation

Attributes

AUGMENTATION_TYPE

MAX_FPS

MAX_PROB

MIN_FPS

MIN_PROB

name

Returns the name of this augmentation