tests/testthat/test-dataset-cmuarctic.R

cmuarctic_dir <- system.file("", package = "torchaudio")

test_that("load_cmuarctics_item", {
  # load
  cmuarctic_ds <- cmuarctic_dataset(cmuarctic_dir)
  expect_length(cmuarctic_ds, 3)

  one_item <- cmuarctic_ds[1]
  expect_length(one_item, 4)
  expect_tensor(one_item[[1]])
})

Try the torchaudio package in your browser

Any scripts or data that you put into this service are public.

torchaudio documentation built on Feb. 16, 2023, 9:41 p.m.