<!--
{
  "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/export(to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech25SFCustomLanguageModelDataC6export2toy10Foundation3URLV_tYaKF"
  },
  "title" : "export(to:)"
}
-->

# export(to:)

Export the accumulated data to a file.

```
func export(to path: URL) async throws
```

## Parameters

`path`

a URL where the exported data will be saved.

## Discussion

The file produced by this method can be provided to `SFSpeechLanguageModel.prepareCustomLanguageModel`
to produce language model and vocabulary files that are then ready to be used in conjunction with the `SFSpeechRecognizer`.

> Throws: Errors related to creating directories and files, and deleting files

---

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)