Learn R Programming

nzilbb.labbcat (version 1.3-0)

getMedia: Downloads a given media track for a given transcript.

Description

Downloads a given media track for a given transcript.

Usage

getMedia(
  labbcat.url,
  id,
  track.suffix = "",
  mime.type = "audio/wav",
  path = ""
)

Value

The name of the file, which is saved in the current directory, or the given path if specified

Arguments

labbcat.url

URL to the LaBB-CAT instance.

id

A transcript ID (i.e. transcript name).

track.suffix

The track suffix of the media.

mime.type

The MIME type of the media, e.g. "audio/wav" or "application/f0".

path

Optional path to directory where the file should be saved.

See Also

getTranscriptIds

getMediaUrl

Examples

Run this code
if (FALSE) {
## define the LaBB-CAT URL
labbcat.url <- "https://labbcat.canterbury.ac.nz/demo/"

## Download the WAV file for BR2044_OllyOhlson.eaf
wav <- getMedia(labbcat.url, "BR2044_OllyOhlson.eaf")

## Download the 'QuakeFace' video file for BR2044_OllyOhlson.eaf
quakeFaceMp4 <- getMedia(labbcat.url, "BR2044_OllyOhlson.eaf", "_face", "video/mp4")
}

Run the code above in your browser using DataLab