KeenASR React Native Plugin (v2.2)
    Preparing search index...

    Interface AlignmentConfig

    Per-call configuration for a text-alignment operation.

    Defaults reproduce classic Levenshtein word edit distance with unit costs and noise-token filtering enabled. For most oral-reading and WER use cases the defaults are appropriate; override fields selectively.

    interface AlignmentConfig {
        insertCost?: number;
        deleteCost?: number;
        substituteCost?: number;
        detectRepetitions?: boolean;
        filterNoiseTokens?: boolean;
    }
    Index

    Properties

    insertCost?: number

    Cost of inserting a recognized token not present in the reference. Default 1.0.

    deleteCost?: number

    Cost of deleting a reference token not present in the recognized text. Default 1.0.

    substituteCost?: number

    Cost of substituting one token for another. When substituteCost > insertCost + deleteCost the aligner degenerates to LCS-style behavior (no substitutions emitted). Default 1.0.

    detectRepetitions?: boolean

    When true, the result populates repetitionRefIndices for words the reader appears to have stuttered or repeated. Default false.

    filterNoiseTokens?: boolean

    When true, recognized tokens whose text begins with < (e.g. <SPOKEN_NOISE>, <UNK>) are dropped before alignment. Leave on when the recognized text comes from an ASR result. Default true.