functional_amplitude_to_db: Amplitude to DB (functional)

functional_amplitude_to_dbR Documentation

Amplitude to DB (functional)

Description

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

Usage

functional_amplitude_to_db(x, multiplier, amin, db_multiplier, top_db = NULL)

Arguments

x

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

multiplier

(float): Use 10.0 for power and 20.0 for amplitude (Default: 10.0)

amin

(float): Number to clamp x (Default: 1e-10)

db_multiplier

(float): Log10(max(ref_value and amin))

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.

Value

tensor: Output tensor in decibel scale


curso-r/torchaudio documentation built on May 4, 2023, 2:27 a.m.