Aligns recognized speech text against a reference text using dynamic programming edit distance. Useful for oral-reading scoring and word-error-rate (WER) computation.
More...
Inherits IDisposable.
|
| | TextAligner (string reference, string langCode) |
| | Creates a text aligner with the given reference text and language code.
|
| |
| | TextAligner (string reference) |
| | Creates a text aligner using the language from the currently initialized recognizer.
|
| |
| AlignmentResult | AlignText (string recognized) |
| | Aligns recognized text against the reference using default configuration. This method is thread-safe and can be called concurrently.
|
| |
| AlignmentResult | AlignText (string recognized, AlignmentConfig config) |
| | Aligns recognized text against the reference with custom configuration. This method is thread-safe and can be called concurrently.
|
| |
| AlignmentResult | IncrementalAlignText (string recognized) |
| | Incrementally aligns recognized text, reusing state from prior calls. Useful for aligning partial recognition results during streaming. NOT thread-safe - do not call concurrently on the same aligner.
|
| |
| AlignmentResult | IncrementalAlignText (string recognized, AlignmentConfig config) |
| | Incrementally aligns recognized text with custom configuration. NOT thread-safe - do not call concurrently on the same aligner.
|
| |
| void | Reset () |
| | Resets incremental alignment state. Call between utterances when using IncrementalAlignText for multiple separate recognition sessions.
|
| |
| void | Dispose () |
| | Releases the native aligner resources. Safe to call multiple times.
|
| |
Aligns recognized speech text against a reference text using dynamic programming edit distance. Useful for oral-reading scoring and word-error-rate (WER) computation.
Supports both stateless alignment (thread-safe) and incremental alignment for streaming partial results (not thread-safe per instance).
using (var aligner =
new TextAligner(
"THE CAT SAT ON THE MAT")) {
var result = aligner.AlignText("THE CAT SAT ON A MAT");
Debug.Log($
"WER: {result.wordErrorRate}, Matches: {result.matches}");
}
Aligns recognized speech text against a reference text using dynamic programming edit distance....
Definition KeenASRTextAligner.cs:166
@ Debug
Verbose output including internal processing details.