Add a fade in and/or fade out to an waveform.

transform_fade(fade_in_len = 0, fade_out_len = 0, fade_shape = "linear")

Arguments

fade_in_len

(int, optional): Length of fade-in (time frames). (Default: 0)

fade_out_len

(int, optional): Length of fade-out (time frames). (Default: 0)

fade_shape

(str, optional): Shape of fade. Must be one of: "quarter_sine", "half_sine", "linear", "logarithmic", "exponential". (Default: "linear")

Value

Tensor: Tensor of audio of dimension (..., time).

Details

forward param: waveform (Tensor): Tensor of audio of dimension (..., time).