torchaudio_loader: Load Audio File

View source: R/backend-common.R

torchaudio_loaderR Documentation

Load Audio File

Description

Loads an audio file from disk using the default loader (getOption("torchaudio.loader")).

Usage

torchaudio_loader(
  filepath,
  offset = 0L,
  duration = 0L,
  unit = c("samples", "time")
)

Arguments

filepath

(str): Path to audio file

offset

(int): Number of frames (or seconds) from the start of the file to begin data loading. (Default: 0)

duration

(int): Number of frames (or seconds) to load. 0 to load everything after the offset. (Default: 0)

unit

(str): "sample" or "time". If "sample" duration and offset will be interpreted as frames, and as seconds otherwise.


curso-r/torchaudio documentation built on Aug. 6, 2022, 2:28 a.m.