<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Speech",
  "identifier" : "/documentation/Speech/SFCustomLanguageModelData/init(locale:identifier:version:builder:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech25SFCustomLanguageModelDataC6locale10identifier7version7builderAC10Foundation6LocaleV_S2SAA0E10Insertable_pyXEtcfc"
  },
  "title" : "init(locale:identifier:version:builder:)"
}
-->

# init(locale:identifier:version:builder:)

Constructs a data container using a builder

```
convenience init(locale: Locale, identifier: String, version: String, @SFCustomLanguageModelData.DataInsertableBuilder builder: () -> any DataInsertable)
```

## Parameters

`locale`

the region and language of the training data (must match with the locale used to construct the `SFSpeechRecognizer` later)

`identifier`

used to uniquely identify the resulting language model on the device where it will be processed

`version`

used to distinguish different versions of the language model on the device where it will be processed

`builder`

a DataInsertableBuilder object that yields DataInsertable objects

## Discussion

The `SFCustomLanguageModelData` class accumulates language model training
and custom vocabulary data, both associated with a specified locale. This initializer
creates an object that is initially populated using the provided builder.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)