One Logo Pool Ball
Speech · IOS API REFERENCE

SFCustomLanguageModelData.DataInsertableBuilder

struct · iOS 17.0+ · SDK 27.1

@resultBuilder struct DataInsertableBuilder

A custom parameter attribute that constructs custom language model data from closures. The `SFCustomLanguageModelData` class provides two methods for accumulating data: manually constructing `PhraseCount` and `CustomPronunciation` objects and providing them using the `insert` methods defined below, or by using the result builder DSL upon initialization. This type supports the latter.

Members (4)

static · iOS 17.0+

buildArray

TypeScript
static buildArray(components: Array<Implements<DataInsertable> | SDKHandle>): SDKHandle
Swift declaration
static func buildArray(_ components: [any DataInsertable]) -> any DataInsertable

Enables support for `for..in` loops.

static · iOS 17.0+

buildEither

TypeScript
static buildEitherFirst(first: Implements<DataInsertable> | SDKHandle): SDKHandle
Swift declaration
static func buildEither(first: any DataInsertable) -> any DataInsertable

Enables support for `if-else` and `switch` constructs.

static · iOS 17.0+

buildEither

TypeScript
static buildEitherSecond(second: Implements<DataInsertable> | SDKHandle): SDKHandle
Swift declaration
static func buildEither(second: any DataInsertable) -> any DataInsertable

Enables support for `if-else` and `switch` constructs.

static · iOS 17.0+

buildOptional

TypeScript
static buildOptional(component?: (Implements<DataInsertable> | SDKHandle) | null): SDKHandle
Swift declaration
static func buildOptional(_ component: (any DataInsertable)?) -> any DataInsertable

Enables support for `if` statements that do not have an `else` clause.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

SFCustomLanguageModelData.DataInsertableBuilder.buildBlock(_:)

A variable number of Swift arguments is not supported.

All Speech types →