evaluate_roles: evaluate speaker roles

Description Usage Arguments Value Examples

View source: R/evaluate_roles.R

Description

evaluate speaker roles

Usage

1
2
3
4
evaluate_roles(test, reference, resolution = 1, duration = NULL,
  summarize = TRUE, tiers = list(CHI = c("CHI", paste0("UC", 1:9)), FEM
  = paste0("FA", 1:9), MAL = paste0("MA", 1:9)), test_ignore = NULL,
  ref_ignore = NULL, allspeech = TRUE)

Arguments

test

character, path to file with annotations in DiViMe (.rttm) format

reference

character, path to reference file with annotations in DiViMe (.rttm) format

resolution

numeric, the time increment in seconds, by default 1

duration

numeric, optional info about the duration of the audio. At its default NULL, the end of the last annotation is taken as the duration

summarize

logical (default is TRUE), should summary metrics be returned or the detailed frame-by-frame results

tiers

a named list that controls which labels/speakers from reference and test annotation are used. The name of each element needs to correspond to the speakers/'tiers' in the test file, e.g. CHI, FEM and MAL. The content of each element then lists the corresponding speakers/tiers of the reference. For example, the entry FEM = c("FA1", "FA2") maps the FEM speaker in the test file to the FA1 and FA2 tiers in the reference file.

test_ignore, ref_ignore

character, the annotation values to be ignored. At its default NULL, nothing is ignored.

allspeech

logical, should the speech detection be taken from all tiers, i.e. even those that were ignored by setting tiers=. Default is TRUE.

Value

a data.frame (for summarize = TRUE) or matrix (for summarize = FALSE)

Examples

1
2
3
4
5
6
7
reference <- read_elan(system.file("spanish.eaf", package = "avutils"))
test <- read_rttm(system.file("yunitator_old_spanish.rttm", package = "avutils"))
evaluate_roles(reference = reference, test = test, duration = 180, resolution = 10)
# use for pure speech detection
# not quite working yet...
# test <- read_rttm(system.file("tocomboSad_spanish.rttm", package = "avutils"))
# evaluate_roles(reference = reference, test = test, duration = 180, resolution = 10)

gobbios/avutils documentation built on Feb. 19, 2020, 9:44 a.m.