---
title: "export(to:)"
framework: speech
role: symbol
role_heading: Instance Method
path: "speech/sfcustomlanguagemodeldata/export(to:)"
---

# export(to:)

Export the accumulated data to a file.

## Declaration

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

## Parameters

- `path`: A URL where the exported data will be saved.

## Discussion

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. note: Errors related to creating directories and files, and deleting files
