From 5a5da762602d9a857b8c8780d8ff568bf593f04d Mon Sep 17 00:00:00 2001 From: Enno Hermann Date: Mon, 13 Nov 2023 21:48:55 +0100 Subject: [PATCH] chore(audio.processor): remove unused compute_stft_paddings Same function available in numpy_transforms --- TTS/utils/audio/processor.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/TTS/utils/audio/processor.py b/TTS/utils/audio/processor.py index b2991338..ce1eb3c7 100644 --- a/TTS/utils/audio/processor.py +++ b/TTS/utils/audio/processor.py @@ -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.