<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Speech",
  "identifier" : "/documentation/Speech/SFSpeechLanguageModel/Configuration",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "c:objc(cs)SFSpeechLanguageModelConfiguration"
  },
  "title" : "SFSpeechLanguageModel.Configuration"
}
-->

# SFSpeechLanguageModel.Configuration

An object describing the location of a custom language model and specialized vocabulary.

```
class Configuration
```

## Overview

Pass this object to [`prepareCustomLanguageModel(for:configuration:completion:)`](/documentation/Speech/SFSpeechLanguageModel/prepareCustomLanguageModel(for:configuration:completion:)) to indicate where that method should create the custom language model file, and to [`customizedLanguageModel`](/documentation/Speech/SFSpeechRecognitionRequest/customizedLanguageModel) or [`customizedLanguage(modelConfiguration:)`](/documentation/Speech/DictationTranscriber/ContentHint/customizedLanguage(modelConfiguration:)) to indicate where the system should find that model to use.

## Topics

### Creating a language model configuration

[`init(languageModel:)`](/documentation/Speech/SFSpeechLanguageModel/Configuration/init(languageModel:))

Creates a configuration with the location of a language model file.

[`init(languageModel:vocabulary:)`](/documentation/Speech/SFSpeechLanguageModel/Configuration/init(languageModel:vocabulary:))

Creates a configuration with the locations of language model and vocabulary files.

[`init(languageModel:vocabulary:weight:)`](/documentation/Speech/SFSpeechLanguageModel/Configuration/init(languageModel:vocabulary:weight:))

Creates a configuration with the locations of language model and vocabulary files, and custom weight.

### Inspecting a language model

[`languageModel`](/documentation/Speech/SFSpeechLanguageModel/Configuration/languageModel)

The location of a compiled language model file.

[`vocabulary`](/documentation/Speech/SFSpeechLanguageModel/Configuration/vocabulary)

The location of a compiled vocabulary file.

[`weight`](/documentation/Speech/SFSpeechLanguageModel/Configuration/weight)

The relative weight of the language model customization. Value must be between 0.0 and 1.0 inclusive.



---

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)