transform_vol: Add a volume to an waveform.

transform_volR Documentation

Add a volume to an waveform.

Description

Add a volume to an waveform.

Usage

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)

Details

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

Value

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


torchaudio documentation built on Feb. 16, 2023, 9:41 p.m.