emonet.transforms module#

Spectrogram function examples from torchaudio.

emonet.transforms.resample_rate(waveform: torch.Tensor, orig_freq: int, new_freq: int = 16000, **kwargs) torch.Tensor[source]#
Parameters
  • waveform (torch.Tensor) – Audio signal to resample.

  • orig_freq (int) – Original sample frequency.

  • new_freq (int) – Desired sample frequency.

Returns

torch.Tensor – Resampled audio signal.

emonet.transforms.get_spectrogram(waveform, n_fft=400, win_len=None, hop_len=None, power=2.0)[source]#
emonet.transforms.get_melspectrogram(waveform, sample_rate=16000, n_fft=400, win_len=None, hop_len=None, power=2.0)[source]#