ttslearn.dsp.logspectrogram

ttslearn.dsp.logspectrogram(y, sr, n_fft=None, hop_length=None, win_length=None, clip=0.001)[source]

Compute log-spectrogram.

Parameters
  • y (ndarray) – Waveform.

  • sr (int) – Sampling rate.

  • n_fft (int, optional) – FFT size.

  • hop_length (int, optional) – Hop length. Defaults to 12.5ms.

  • win_length (int, optional) – Window length. Defaults to 50 ms.

  • clip (float, optional) – Clip the magnitude. Defaults to 0.001.

Returns

Log-spectrogram.

Return type

numpy.ndarray