捷徑

FluentSpeechCommands

class torchaudio.datasets.FluentSpeechCommands(root: Union[str, Path], subset: str = 'train')[source]

Fluent Speech Commands [Lugosch et al., 2019] 資料集

參數:
  • root (str of Path) – 找到資料集的目錄路徑。

  • subset (str, optional) – 要使用的資料集子集。選項:["train", "valid", "test"]。 (預設:"train"

__getitem__

FluentSpeechCommands.__getitem__(n: int) Tuple[Tensor, int, str, int, str, str, str, str][原始碼]

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

參數:

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

傳回:

以下項目的元組;

Tensor

波形

int

取樣率

str

檔案名稱

int

說話者 ID

str

轉錄

str

動作

str

物件

str

位置

get_metadata

FluentSpeechCommands.get_metadata(n: int) Tuple[str, int, str, int, str, str, str, str][原始碼]

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

參數:

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

傳回:

以下項目的元組;

str

音訊的路徑

int

取樣率

str

檔案名稱

int

說話者 ID

str

轉錄

str

動作

str

物件

str

位置

文件

存取 PyTorch 的完整開發人員文件

檢視文件

教學

取得針對初學者和進階開發人員的深入教學課程

檢視教學課程

資源

尋找開發資源並取得問題解答

檢視資源