audiblelight.augmentation.TimeWarpSilence#
- class audiblelight.augmentation.TimeWarpSilence(sample_rate=44100, fps=None, prob=None)#
Bases:
TimeWarpApplies 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:
Silence the frame (replace with zeros)
- 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_TYPEMAX_FPSMAX_PROBMIN_FPSMIN_PROBnameReturns the name of this augmentation