Loudness¶
- class torchaudio.transforms.Loudness(sample_rate: int)[source]¶
Measure audio loudness according to the ITU-R BS.1770-4 recommendation.
- Parameters:
sample_rate (int) – Sample rate of audio signal.
- Example
>>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) >>> transform = transforms.Loudness(sample_rate) >>> loudness = transform(waveform)
- Reference:
- forward(wavefrom: Tensor)[source]¶
- Parameters:
waveform (torch.Tensor) – audio waveform of dimension (…, channels, time)
- Returns:
loudness estimates (LKFS)
- Return type:
Tensor