From 990d7f38077a3a453d099fb8a2c6c7d980b6eef5 Mon Sep 17 00:00:00 2001 From: Sean Kim Date: Tue, 7 Jun 2022 14:48:11 -0700 Subject: [PATCH] Quesst14 return type change (#2458) Summary: Fixing return types for quesst14 Pull Request resolved: https://github.com/pytorch/audio/pull/2458 Reviewed By: carolineechen Differential Revision: D36977139 Pulled By: skim0514 fbshipit-source-id: f8f5a2de7cab2de1bec49c529c3bb9316145403d --- torchaudio/datasets/quesst14.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchaudio/datasets/quesst14.py b/torchaudio/datasets/quesst14.py index 1d24a5303f..68ddceeaf9 100644 --- a/torchaudio/datasets/quesst14.py +++ b/torchaudio/datasets/quesst14.py @@ -69,12 +69,12 @@ def __init__( elif subset == "eval": self.data = filter_audio_paths(self._path, language, "language_key_eval.lst") - def _load_sample(self, n: int) -> Tuple[torch.Tensor, str]: + def _load_sample(self, n: int) -> Tuple[torch.Tensor, int, str]: audio_path = self.data[n] wav, sample_rate = torchaudio.load(audio_path) return wav, sample_rate, audio_path.with_suffix("").name - def __getitem__(self, n: int) -> Tuple[torch.Tensor, str]: + def __getitem__(self, n: int) -> Tuple[torch.Tensor, int, str]: """Load the n-th sample from the dataset. Args: