快捷方式

VoxCeleb1Identification

torchaudio.datasets.VoxCeleb1Identification(root: Union[str, Path], subset: str = 'train', meta_url: str = 'https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/iden_split.txt', download: bool = False)[source]

VoxCeleb1 [Nagrani et al., 2017] 資料集,用於說話人識別任務。

每個資料樣本包含波形、取樣率、說話人 ID 和檔案 ID。

引數:
  • root (str or Path) – 資料集所在目錄或下載目錄的路徑。

  • subset (str, 可選) – 要使用的資料集子集。選項:[“train”, “dev”, “test”]。 (Default: "train")

  • meta_url (str, 可選) – 包含子集標籤和檔案路徑列表的元檔案的 URL。每行的格式為 subset file_path"。 例如: ``1 id10006/nLEBBc9oIFs/00003.wav1, 2, 3 分別表示 train, dev, 和 test 子集。 (Default: "https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/iden_split.txt")

  • download (bool, 可選) – 如果在 root 路徑下找不到資料集,是否下載資料集。(Default: False)。

注意

VoxCeleb1Identification 資料集的檔案結構如下

└─ root/

└─ wav/

└─ speaker_id 資料夾

預先下載了 "vox1_dev_wav.zip""vox1_test_wav.zip" 檔案的使用者需要將解壓後的檔案移動到同一個 root 目錄下。

__getitem__

VoxCeleb1Identification.__getitem__(n: int) Tuple[Tensor, int, int, str][source]

從資料集中載入第 n 個樣本。

引數:

n (int) – 要載入的樣本的索引

返回:

包含以下項的元組;

Tensor

波形

int

取樣率

int

說話人 ID

str

檔案 ID

get_metadata

VoxCeleb1Identification.get_metadata(n: int) Tuple[str, int, int, str][source]

獲取資料集中第 n 個樣本的元資料。返回檔案路徑而不是波形,但其他方面返回與 __getitem__() 相同的欄位。

引數:

n (int) – 樣本的索引

返回:

包含以下項的元組;

str

音訊路徑

int

取樣率

int

說話人 ID

str

檔案 ID

文件

訪問 PyTorch 的完整開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並解答你的問題

檢視資源