Module: textgrid

This module contains the datastructures used for working with Textgrids, IntervalTiers, and PointTiers, and the primary functions used to operate over them.

A Textgrid() is a container for annotation tiers. Annotation tiers come in two varieties: IntervalTier and PointTier. With this library, a textgrid can be queried, be used to filter data points, cleaned, or algorithmically altered, etc.
Since:
  • March 25, 2015
Author:
  • Tim Mahrt
Source:

Classes

IntervalTier
PointTier
Textgrid
TextgridTier

Methods

(inner) compareEntries(entryA, entryB) → {boolean}

Returns true if the two entries are the same, false otherwise
Parameters:
Name Type Description
entryA Array
entryB Array
Source:
Returns:
Type
boolean

(inner) compareTextgrids(tg1, tg2) → {boolean}

Returns true if the two textgrids are the same, false otherwise
Parameters:
Name Type Description
tg1 Textgrid
tg2 Textgrid
Source:
Returns:
Type
boolean

(inner) compareTiers(tier1, tier2) → {boolean}

Returns true if the two tiers are the same, false otherwise
Parameters:
Name Type Description
tier1 TextgridTier
tier2 TextgridTier
Source:
Returns:
Type
boolean

(inner) copyTextgrid(tg) → {Textgrid}

Returns a deep copy of a textgrid.
Parameters:
Name Type Description
tg Textgrid
Source:
Returns:
Type
Textgrid

(inner) copyTier(tier) → {TextgridTier}

Returns a deep copy of a tier
Parameters:
Name Type Description
tier TextgridTier
Object an object containing optional values to replace those in the copy. If the four paramaters name, entryList, minTimestamp, and maxTimestamp are null or not specified, those in the tier will be used (default behaviour).
Source:
Returns:
Type
TextgridTier

(inner) findLabelInTier() → {Array}

Returns the indexes of the entries that match the search label
Source:
Returns:
Type
Array

(inner) getEntriesInInterval() → {Array}

Given an interval, returns entries in an interval tier that are in or (for intervals) that partially overlap with it
Source:
Returns:
entryList
Type
Array

(inner) getNonEntriesFromIntervalTier() → {Array}

Returns the regions of the textgrid without labels
Source:
Returns:
invertedEntryList - where each entry looks like [start time, end time, '']
Type
Array

(inner) getValuesAtPoints(pointTier, dataTupleList) → {Array}

Get the values that occur at points in the point tier.
Parameters:
Name Type Description
pointTier PointTier
dataTupleList Array should be ordered in time; must be of the form [(t1, v1a, v1b, ..), (t2, v2a, v2b, ..), ..]
Source:
Returns:
Type
Array

(inner) getValuesInIntervals() → {Array}

Returns data from dataTupleList contained in labeled intervals
Source:
Returns:
Type
Array