chore(audio.processor): remove unused compute_stft_paddings

Same function available in numpy_transforms
This commit is contained in:
Enno Hermann 2023-11-13 21:48:55 +01:00
parent d75879802a
commit 5a5da76260
1 changed files with 0 additions and 9 deletions

View File

@ -533,15 +533,6 @@ class AudioProcessor(object):
pad_mode=self.stft_pad_mode,
)
def compute_stft_paddings(self, x, pad_sides=1):
"""Compute paddings used by Librosa's STFT. Compute right padding (final frame) or both sides padding
(first and final frames)"""
assert pad_sides in (1, 2)
pad = (x.shape[0] // self.hop_length + 1) * self.hop_length - x.shape[0]
if pad_sides == 1:
return 0, pad
return pad // 2, pad // 2 + pad % 2
def compute_f0(self, x: np.ndarray) -> np.ndarray:
"""Compute pitch (f0) of a waveform using the same parameters used for computing melspectrogram.