Contextual information that may be shared among analyzers.
Members (5)
get · iOS 26.0+
contextualStrings
TypeScript
get contextualStrings(): NativeMap<AnalysisContext_ContextualStringsTag, Array<string>>
Swift declaration
final var contextualStrings: [AnalysisContext.ContextualStringsTag : [String]] { get set }
Words or phrases, grouped by tag, that should be recognized even if they are not in the system vocabulary.
With the ``DictationTranscriber`` module, you can use this property to specify short custom phrases that are unique to your app. You might include phrases with the names of characters, products, or places that are specific to your app. Assigning custom phrases to this property improves the likelihood of those phrases being recognized.
Keep phrases relatively brief, limiting them to one or two words whenever possible. Lengthy phrases are less likely to be recognized. In addition, try to limit each phrase to something the user can say without pausing. Limit the total number of phrases across all tags to no more than 100.
You might also include domain-specific terminology or unusual or made-up words, but the system may not estimate their pronounciation correctly. You can provide a custom language model with correct pronounciations to ``DictationTranscriber`` by initializing it with a ``DictationTranscriber/ContentHint/customizedLanguage(modelConfiguration:)`` content hint.
Use the tag to easily swap out some of the strings while leaving others in place. The framework provides a predefined ``ContextualStringsTag/general`` tag.
set · iOS 26.0+
contextualStrings
TypeScript
set contextualStrings(value: NativeMap<AnalysisContext_ContextualStringsTag, Array<string>>)
Swift declaration
final var contextualStrings: [AnalysisContext.ContextualStringsTag : [String]] { get set }
Words or phrases, grouped by tag, that should be recognized even if they are not in the system vocabulary.
With the ``DictationTranscriber`` module, you can use this property to specify short custom phrases that are unique to your app. You might include phrases with the names of characters, products, or places that are specific to your app. Assigning custom phrases to this property improves the likelihood of those phrases being recognized.
Keep phrases relatively brief, limiting them to one or two words whenever possible. Lengthy phrases are less likely to be recognized. In addition, try to limit each phrase to something the user can say without pausing. Limit the total number of phrases across all tags to no more than 100.
You might also include domain-specific terminology or unusual or made-up words, but the system may not estimate their pronounciation correctly. You can provide a custom language model with correct pronounciations to ``DictationTranscriber`` by initializing it with a ``DictationTranscriber/ContentHint/customizedLanguage(modelConfiguration:)`` content hint.
Use the tag to easily swap out some of the strings while leaving others in place. The framework provides a predefined ``ContextualStringsTag/general`` tag.
get · iOS 26.0+
userData
TypeScript
get userData(): NativeMap<AnalysisContext_UserDataTag, SDKHandle>
Swift declaration
final var userData: [AnalysisContext.UserDataTag : any Sendable] { get set }
A dictionary of application-specific contextual information.
set · iOS 26.0+
userData
TypeScript
set userData(value: NativeMap<AnalysisContext_UserDataTag, SDKHandle>)
Swift declaration
final var userData: [AnalysisContext.UserDataTag : any Sendable] { get set }
A dictionary of application-specific contextual information.