    def get_energy(self, wavs, mel_spec=None):
        """Get Energy Features

        Args:
            wavs: Tensor whose shape is (B, T)
            mel_spec: Tensor whose shape is (B, n_mels, n_frames)

        Returns:
            Tensor whose shape is (B, n_frames)
        """
        if mel_spec is None:
            mel_spec = self.get_mel_spectrogram(wavs)

        energies = (mel_spec.exp() ** 2).sum(dim=1).sqrt()
        return energies
Get Energy Features

Args:
wavs: Tensor whose shape is (B, T)
mel_spec: Tensor whose shape is (B, n_mels, n_frames)

Returns:
Tensor whose shape is (B, n_frames)
processors/audio_features_extractor.py