torchaudio.functional.gain¶
- torchaudio.functional.gain(waveform: Tensor, gain_db: float = 1.0) Tensor [source]¶
Apply amplification or attenuation to the whole waveform.
- Parameters:
waveform (Tensor) – Tensor of audio of dimension (…, time).
gain_db (float, optional) Gain adjustment in decibels (dB) –
1.0
).
- Returns:
the whole waveform amplified by gain_db.
- Return type:
Tensor