Add a volume to an waveform.

transform_vol(gain, gain_type = "amplitude")

Arguments

gain

(float): Interpreted according to the given gain_type: If gain_type = amplitude, gain is a positive amplitude ratio. If gain_type = power, gain is a power (voltage squared). If gain_type = db, gain is in decibels.

gain_type

(str, optional): Type of gain. One of: amplitude, power, db (Default: amplitude)

Value

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

Details

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