    def get_f0(self, wavs, wav_lens=None, use_interpolate=False, return_uv=False):
        """Get F0 Features

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

        Returns:
            Tensor whose shape is (B, n_frames)
        """
        device = wavs.device

        f0s = []
        uvs = []
        for i, w in enumerate(wavs):
            if wav_lens is not None:
                w = w[: wav_lens[i]]

            f0, uv = extract_f0_features(
                # Use numpy to extract
                w.cpu().numpy(),
                self.cfg.preprocess,
                use_interpolate=use_interpolate,
                return_uv=True,
            )
            f0s.append(torch.as_tensor(f0, device=device))
            uvs.append(torch.as_tensor(uv, device=device, dtype=torch.long))

        # (B, n_frames)
        f0s = pad_sequence(f0s, batch_first=True, padding_value=0)
        uvs = pad_sequence(uvs, batch_first=True, padding_value=0)

        if return_uv:
            return f0s, uvs

        return f0s
Get F0 Features

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

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