<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/outputToFileURL",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@NSSpeechOutputToFileURLProperty"
  },
  "title" : "outputToFileURL"
}
-->

# outputToFileURL

Set the speech output destination to a file or to the computer’s speakers.

```
static let outputToFileURL: NSSpeechSynthesizer.SpeechPropertyKey
```

## Discussion

An <doc://com.apple.documentation/documentation/Foundation/NSURL> object. To write the speech output to a file, use the file’s <doc://com.apple.documentation/documentation/Foundation/NSURL>; to generate the sound through the computer’s speakers, use `nil`. This property works with [`setObject(_:forProperty:)`](/documentation/AppKit/NSSpeechSynthesizer/setObject(_:forProperty:)).

---

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)