getFragmentAnnotationData: Gets binary annotation data in fragments.

View source: R/getFragmentAnnotationData.R

getFragmentAnnotationDataR Documentation

Gets binary annotation data in fragments.

Description

In some annotation layers, the annotations have not only a textual label, but also binary data associated with it; e.g. an image or a data file. In these cases, the 'type' of the layer is a MIME type, e.g. 'image/png'. This function gets annotations between given start/end times on the given MIME-typed layer, and retrieves the binary data as files, whose names are returned by the function.

Usage

getFragmentAnnotationData(
  labbcat.url,
  transcript.id,
  start,
  end,
  layer.id,
  path = "",
  no.progress = FALSE
)

Arguments

labbcat.url

URL to the LaBB-CAT instance

transcript.id

The transcript ID (transcript name) of the sound recording, or a vector of transcript IDs.

start

The start time in seconds, or a vector of start times.

end

The end time in seconds, or a vector of end times.

layer.id

The ID of the MIME-typed layer.

path

Optional path to directory where the files should be saved.

no.progress

TRUE to supress visual progress bar. Otherwise, progress bar will be shown when interactive().

Value

The names of the files.

See Also

  • getFragmentAnnotations

  • getFragments

  • getSoundFragments

Examples

## Not run: 
## Get mediapipe image annotations for the eleventh second of a transcript
png.files <- getFragmentAnnotationData(
    labbcat.url, c("AP511_MikeThorpe.eaf"), c(10), c(11), c("mediapipe"), path = "png")

## End(Not run)

nzilbb.labbcat documentation built on June 8, 2025, 10:57 a.m.