From e229f5c081ce1cf3cec90bc50b8459827144fecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Tue, 1 Jun 2021 09:45:59 +0200 Subject: [PATCH] fix type annotations --- TTS/tts/utils/speakers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TTS/tts/utils/speakers.py b/TTS/tts/utils/speakers.py index 5c10c589..cebf0dca 100755 --- a/TTS/tts/utils/speakers.py +++ b/TTS/tts/utils/speakers.py @@ -241,7 +241,7 @@ class SpeakerManager: """ return [x["embedding"] for x in self.x_vectors.values() if x["name"] == speaker_idx] - def get_mean_x_vector(self, speaker_idx: str, num_samples: int = None, randomize: bool = False) -> np.Array: + def get_mean_x_vector(self, speaker_idx: str, num_samples: int = None, randomize: bool = False) -> np.ndarray: """Get mean x_vector of a speaker ID. Args: @@ -250,7 +250,7 @@ class SpeakerManager: randomize (bool, optional): Pick random `num_samples`of x_vectors. Defaults to False. Returns: - np.Array: Mean x_vector. + np.ndarray: Mean x_vector. """ x_vectors = self.get_x_vectors_by_speaker(speaker_idx) if num_samples is None: @@ -315,11 +315,11 @@ class SpeakerManager: x_vector = _compute(wav_file) return x_vector[0].tolist() - def compute_x_vector(self, feats: Union[torch.Tensor, np.Array]) -> List: + def compute_x_vector(self, feats: Union[torch.Tensor, np.ndarray]) -> List: """Compute x_vector from features. Args: - feats (Union[torch.Tensor, np.Array]): Input features. + feats (Union[torch.Tensor, np.ndarray]): Input features. Returns: List: computed x_vector.