Class

INSpeakableString

A custom phrase to be resolved by an Intents extension.

Overview

When creating your Intents extension, you can define custom vocabulary for some types of intents. For example, a workout app may provide a custom AppIntentVocabulary.plist file with the names of standard workouts that are shared by all users of the app. In places where those terms might be used, the intent object contains an INSpeakableString object.

Use the contents of an INSpeakableString object to resolve the specified term during the handling of an intent. If the user spoke a term that is defined in your AppIntentVocabulary.plist file, Siri includes the identifier of that term in the string’s identifier property. For unrecognized terms, the identifier is nil.

Topics

Initializing a Speakable String

init(spokenPhrase: String)

Initializes the string with the specified phrase.

init(vocabularyIdentifier: String, spokenPhrase: String, pronunciationHint: String?)

Initializes the string with a phrase from your app's vocabulary.

init(identifier: String, spokenPhrase: String, pronunciationHint: String?)

Initializes the string with the specified identifier and phrase information.

Deprecated

See Also

String

protocol INSpeakable

Pronunciation hints for strings used in a spoken interface.