COMMONVOICE¶ class torchaudio.datasets.COMMONVOICE(root: Union[str, Path], tsv: str = 'train.tsv')[源]¶ CommonVoice [Ardila et al., 2020] 数据集。 参数 root (str 或 Path) – 数据集所在的目录路径。(其中包含 tsv 文件。) tsv (str, 可选) – 用于构建元数据的 tsv 文件名,例如 "train.tsv", "test.tsv", "dev.tsv", "invalidated.tsv", "validated.tsv" 和 "other.tsv"。(默认值:"train.tsv") __getitem__¶ COMMONVOICE.__getitem__(n: int) → Tuple[Tensor, int, Dict[str, str]][源]¶ 加载数据集中的第 n 个样本。 参数 n (int) – 要加载的样本的索引 返回 元组包含以下项: 张量波形 int采样率 Dict[str, str]包含来自相应 TSV 文件以下项目的字典; "client_id" "path" "sentence" "up_votes" "down_votes" "age" "gender" "accent"