biographize: Create a biography of the labels in a list of segments in a...

View source: R/reindeeR_metadata.R

biographizeR Documentation

Create a biography of the labels in a list of segments in a tidy manner

Description

Create a biography of the labels in a list of segments in a tidy manner

Usage

biographize(segs_tbl, emuDBhandle, compute_digests = FALSE, algorithm = "sha1")

Arguments

segs_tbl

The tibble that is the result query call.

emuDBhandle

A emuR database handle.

compute_digests

Should information that describes the recorded sound files be computed so that is is definitelly part of the added metadata information.

algorithm

The checksum algorithm that should be used when computing sound file information.

Value

A tibble

Examples

## Not run: 
create_emuRdemoData()
ae_test <- load_emuDB(file.path(tempdir(),"emuR_demoData","ae_emuDB"))

# Database-wide default information
add_metadata(ae_test,list("Accent"="Northern","Elicitation"="Scripted"))
#Bundle specific information
add_metadata(ae_test,list("Speaker.Sex"="Male","Date"="2020-03-04"),session="0000",bundle="msajc003")

# Get all the 'n' segments in the database
query(ae_test,"Phonetic = n",resultType = "tibble") -> ae_nt
# Add information related to the nature the recording sessions
# e.g. the speaker ID, the date of the recording
ae_nt %>% biographize(ae_test) %>% glimpse()
# This code does the same as the above, but it will also compute new
# information that is strictly  aimed at identifying the recording
# (length of recording (in ms) and a sha1 digest of the wav file).
ae_nt %>%
   biographize(ae_test,compute_digests=TRUE,algorithm="sha1") %>%
   glimpse()
rm(ae_test)


## End(Not run)


humlab-speech/reindeer documentation built on May 21, 2023, 4:43 p.m.