KIOSAlternativePronunciation Class Reference

Inherits from NSObject
Declared in KIOSDecodingGraph.h

Overview

AlternativePronunciation is a class that defines mapping beween a word and its phonetic pronunciation. Phonetic pronunciation is a space separated string of phonemes that define how the word is pronounced. The names of the phonemes are defined in ASR Bundle lang/phones.txt file. For some languages for which this mapping is not deterministic, ASR Bundle will contain a large lookup table in lang/lexicon.txt file.

You can use AlternativePronunciations to provide alternatives to existing pronunciations, to define pronunciations for the words that are not in the lexicon.txt file (including made-up words), or to provide common mispronunciations (which can be useful in some scenarios such as language learning and reading instruction); For the latter, you can also provide a tag when defining AlternativePronunciation; if such alternative pronunciation is recognized by the recognizer, the # symbol and the provided tag will be appended to the word in the result (e.g. “PEAK#WRONG”, if the tag was set to “WRONG”).

Example:

KIOSAlternativePronunciation *ap = [KIOSAlternativePronunciation new];
ap.word = @"PEAK";
ap.pronunciation = @"P IH0 K";
ap.tag = @"WRONG";

  word

Name of the word.

@property (nonatomic, strong, nonnull) NSString *word

Declared In

KIOSDecodingGraph.h

  pronunciation

Phonetic transcription of a word, provided as a space-separated sequence of phones.

@property (nonatomic, strong, nonnull) NSString *pronunciation

Declared In

KIOSDecodingGraph.h

  tag

Optional value, which, if provided, will be appended together with the # symbol to the word if the variation of the word with the provided pronunciation is recognized. For example, PEAK#WRONG.

@property (nonatomic, strong, nullable) NSString *tag

Declared In

KIOSDecodingGraph.h