Skip to content

Commit

Permalink
Quesst14 return type change (#2458)
Browse files Browse the repository at this point in the history
Summary:
Fixing return types for quesst14

Pull Request resolved: #2458

Reviewed By: carolineechen

Differential Revision: D36977139

Pulled By: skim0514

fbshipit-source-id: f8f5a2de7cab2de1bec49c529c3bb9316145403d
  • Loading branch information
Sean Kim authored and facebook-github-bot committed Jun 7, 2022
1 parent da3ffe9 commit a5a7849
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchaudio/datasets/quesst14.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a5a7849

Please sign in to comment.