internal__normalize_audio: Audio Normalization

View source: R/internal-misc_ops.R

internal__normalize_audioR Documentation

Audio Normalization

Description

Audio normalization of a tensor in-place. The normalization can be a bool, a number, or a function that takes the audio tensor as an input. SoX uses 32-bit signed integers internally, thus bool normalizes based on that assumption.

Usage

internal__normalize_audio(signal, normalization = TRUE)

Arguments

signal

(Tensor): waveform

normalization

(bool, int or function): Optional normalization. If boolean TRUE, then output is divided by 2^31. Assuming the input is signed 32-bit audio, this normalizes to ⁠[-1, 1]⁠. If numeric, then output is divided by that number. If function, then the output is passed as a paramete to the given function, then the output is divided by the result. (Default: TRUE)


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