transform_amplitude_to_db: Amplitude to DB

transform_amplitude_to_dbR Documentation

Amplitude to DB

Description

Turn a tensor from the power/amplitude scale to the decibel scale.

Usage

transform_amplitude_to_db(stype = "power", top_db = NULL)

Arguments

stype

(str, optional): scale of input tensor ('power' or 'magnitude'). The power being the elementwise square of the magnitude. (Default: 'power')

top_db

(float or NULL, optional): Minimum negative cut-off in decibels. A reasonable number is 80. (Default: NULL)

Details

This output depends on the maximum value in the input tensor, and so may return different values for an audio clip split into snippets vs. a a full clip.

forward param: x (Tensor): Input tensor before being converted to decibel scale

Value

tensor: Output tensor in decibel scale


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