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

    Class WordPronunciation

    Defines a pronunciation for a word, which can be used to augment default pronunciations defined in the ASR bundle lexicon. This can be useful for words not in the lexicon (e.g., made-up words, brand names), regional pronunciation variants, or common mispronunciations that should be recognized and tagged in the result.

    Pass an array of these when creating a decoding graph via createDecodingGraphFromPhrases.

    const wp = new WordPronunciation('flurbnix', 'F L ER1 B N IH0 K S', 'custom');
    const valid = await wp.isValid();
    Index

    Constructors

    Methods

    Properties

    Constructors

    • Parameters

      • word: string
      • pronunciation: string
      • Optionaltag: string

      Returns WordPronunciation

    Methods

    • Validate this pronunciation against the loaded ASR bundle's lexicon.

      The SDK must be initialized before calling this method.

      Returns Promise<boolean>

      true if the pronunciation is valid for the loaded ASR bundle.

    Properties

    word: string

    The word text as it appears in the phrase list.

    pronunciation: string

    Space-separated phone sequence in ARPAbet format (e.g., "HH AH0 L OW1").

    tag?: string

    Optional tag appended to the recognized word with # when this pronunciation variant is matched (e.g., "tomato#british").