Create a forced aligner from a model directory and a pronunciation dictionary.
const aligner = new ForcedAligner(config)
Async factory calls this with an internal descriptor.
Compute the alignment of one utterance.
The transcript of the whole utterance. Hanzi text is tokenized per character (multi-character dictionary keys give pronunciation context); anything else is split on whitespace. Punctuation is ignored.
The alignment result; empty (no tiers, empty textgrid) with a warning on stderr when the stream has no features, every word is out-of-vocabulary, or word boundaries cannot be recovered. An interval has an empty text for a silence gap in the "words" tier.
Compute the alignment of one utterance off the main thread.
Create an utterance stream. Fill it with acceptWaveform(), then pass it to compute().
StaticcreateCreate a forced aligner off the main thread and resolve it.
ForcedAligner: given a wave and its transcript, it computes the start/end time of every phone and word.