YESNO¶ class torchaudio.datasets.YESNO(root: Union[str, Path], url: str = 'http://www.openslr.org/resources/1/waves_yesno.tar.gz', folder_in_archive: str = 'waves_yesno', download: bool = False)[source]¶ YesNo [YesNo, n.d.] 数据集。 参数: root (str or Path) – 数据集所在目录或下载目录的路径。 url (str, 可选) – 从中下载数据集的 URL。 (默认值:"http://www.openslr.org/resources/1/waves_yesno.tar.gz") folder_in_archive (str, 可选) – 数据集的顶层目录。 (默认值:"waves_yesno") download (bool, 可选) – 如果根路径中没有找到数据集,是否下载数据集。 (默认值:False). 使用 YESNO 的教程 音频数据集 音频数据集 __getitem__¶ YESNO.__getitem__(n: int) → Tuple[Tensor, int, List[int]][source]¶ 从数据集中加载第 n 个样本。 参数: n (int) – 要加载的样本的索引 返回值: 以下项目的元组; Tensor波形 int采样率 List[int]标签