---
title: "init(locale:identifier:version:builder:)"
framework: speech
role: symbol
role_heading: Initializer
path: "speech/sfcustomlanguagemodeldata/init(locale:identifier:version:builder:)"
---

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

Constructs a data container using a builder

## Declaration

```swift
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

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.

## See Also

### Creating a model data container

- [init(locale:identifier:version:)](speech/sfcustomlanguagemodeldata/init(locale:identifier:version:).md)
- [SFCustomLanguageModelData.DataInsertableBuilder](speech/sfcustomlanguagemodeldata/datainsertablebuilder.md)
