make.seglist {emu} | R Documentation |
This is the appropriate way to make an Emu segment list and ensure that it has all of the required components.
make.seglist(labels, start, end, utts, query, type, database)
labels |
A character vector of labels for each segment |
start |
A vector of start times |
end |
A vector of end times |
utts |
A character vector of utterance names |
query |
A query string |
type |
segment or event |
database |
The database name associated with the segment list |
An Emu segment list is the result of a query to a speech database (see
emu.query
) and has one row per matching segment or event
from the query. Each row lists the label, start and end times (in
milliseconds) and utterance name for the segment. This information
is used by emu.track
and other functions to extract
data corresponding to these segments.
In order to ensure the proper format for segment lists and to ensure
against future changes to the format, make.seglist
should be
used whenever you wish to create a segment list. Another function,
modify.seglist
can be used to change some part of an
existing segment list. The functions label.emusegs
,
start.emusegs
, end.emusegs
and utt.emusegs
can
be used to access the different columns of the segment list.
An Emu segment list.
Steve Cassidy
l <- c("A", "B", "C") s <- 1:3 e <- 2:4 u <- c("u1", "u1", "u1") segs <- make.seglist(l, s, e, u, "Fake Query", "segment", "fake") segs ## summary gives an overview of the data in the segment list summary(segs) # The following should be TRUE label(segs) == l dur(segs) == s end(segs) == e utt(segs) == u emusegs.database(segs) == "fake" emusegs.type(segs) == "segment" emusegs.query(segs) == "Fake Query" # segment durations should all be 1 dur(segs) == c(1,1,1)