Commit a5a7849a authored by Sean Kim's avatar Sean Kim Committed by Facebook GitHub Bot
Browse files

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
parent da3ffe9b
......@@ -69,12 +69,12 @@ class QUESST14(Dataset):
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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment