IEMOCAP¶ class torchaudio.datasets.IEMOCAP(root: Union[str, Path], sessions: Tuple[str] = (1, 2, 3, 4, 5), utterance_type: Optional[str] = None)[source]¶ IEMOCAP [Busso et al., 2008] 数据集。 参数 root (str or Path) – 数据集顶层目录所在的根目录 sessions (Tuple[int]) – 要使用的会话(1-5)的元组。(默认:(1, 2, 3, 4, 5)) utterance_type (str or None, optional) – 要包含在数据集中的话语类型。选项:“scripted”(脚本化)、“improvised”(即兴),None。如果为None,则使用脚本化和即兴数据。 __getitem__¶ IEMOCAP.__getitem__(n: int) → Tuple[Tensor, int, str, str, str][source]¶ 加载数据集中的第 n 个样本。 参数 n (int) – 要加载的样本的索引 返回 元组包含以下项: 张量波形 int采样率 str文件名 str标签(“neu”、“hap”、“ang”、“sad”、“exc”、“fru”之一) str说话人 get_metadata¶ IEMOCAP.get_metadata(n: int) → Tuple[str, int, str, str, str][source]¶ 从数据集中获取第 n 个样本的元数据。返回文件路径而不是波形,但返回的字段与__getitem__() 相同。 参数 n (int) – 要加载的样本的索引 返回 元组包含以下项: str音频文件路径 int采样率 str文件名 str标签(“neu”、“hap”、“ang”、“sad”、“exc”、“fru”之一) str说话人