augment.signal
AudioPadType
fastaudio.augment.signal.AudioPadType
(value, names=None, *, module=None, qualname=None, type=None, start=1)An enumeration.
Repeat
An enumeration.
Zeros
An enumeration.
Zeros_After
An enumeration.
ResizeSignal
fastaudio.augment.signal.ResizeSignal
(self, duration, pad_mode=Crops signal to be length specified in ms by duration, padding if needed
SignalShifter
fastaudio.augment.signal.SignalShifter
(self, p=0.5, max_pct=0.2, max_time=None, direction=0, roll=False)Randomly shifts the audio signal by max_pct
%.
direction must be -1(left) 0(bidirectional) or 1(right).
NoiseColor
fastaudio.augment.signal.NoiseColor
()Exponent beta values for named noise colors (see colored_noise
).
Blue
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
Brown
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
Pink
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
Violet
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
White
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
valid
(value)Is value
a valid color for noise?
AddNoise
fastaudio.augment.signal.AddNoise
(self, noise_level=0.05, color=0, p=0.5)Adds noise of specified color and level to the audio signal
ChangeVolume
fastaudio.augment.signal.ChangeVolume
(self, p=0.5, lower=0.5, upper=1.5)Changes the volume of the signal
SignalCutout
fastaudio.augment.signal.SignalCutout
(self, p=0.5, max_cut_pct=0.15)Randomly zeros some portion of the signal
SignalLoss
fastaudio.augment.signal.SignalLoss
(self, p=0.5, max_loss_pct=0.15)Randomly loses some portion of the signal
DownmixMono
fastaudio.augment.signal.DownmixMono
(self, enc=None, dec=None, split_idx=None, order=None)Transform multichannel audios into single channel