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

    Function prepareForListeningWithContextualDecodingGraph

    • Prepare the recognizer to listen using a contextual decoding graph at a specific context index.

      Call this to switch between contexts without rebuilding the graph. The recognizer will only match phrases from the selected context.

      Parameters

      • dgName: string

        Name of the contextual decoding graph (created via createContextualDecodingGraphFromPhrases).

      • contextId: number

        Zero-based index of the context to activate.

      • computeGoP: boolean = false

        If true, compute GoP scores. Defaults to false.

      Returns Promise<boolean>

      true if preparation succeeded, false if the context index is out of bounds or the graph doesn't exist.