<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureAudioFileOutput",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureAudioFileOutput"
  },
  "title" : "AVCaptureAudioFileOutput"
}
-->

# AVCaptureAudioFileOutput

A capture output that records audio and saves the recorded audio to a file.

```
class AVCaptureAudioFileOutput
```

## Overview

`AVCaptureAudioFileOutput` implements the complete file recording interface declared by [`AVCaptureFileOutput`](/documentation/AVFoundation/AVCaptureFileOutput) for writing media data to audio files. In addition, you can configure options specific to the audio file formats, including writing metadata collections to each file and specifying audio encoding options. `AVCaptureAudioFileOutput` does not, however, support [`startRecording(to:recordingDelegate:)`](/documentation/AVFoundation/AVCaptureFileOutput/startRecording(to:recordingDelegate:))—use [`startRecording(to:outputFileType:recordingDelegate:)`](/documentation/AVFoundation/AVCaptureAudioFileOutput/startRecording(to:outputFileType:recordingDelegate:)) instead.

## Topics

### Discovering supported types

[`availableOutputFileTypes()`](/documentation/AVFoundation/AVCaptureAudioFileOutput/availableOutputFileTypes())

Returns an array containing UTIs identifying the file types `AVCaptureAudioFileOutput` can write.

### Starting a recording

[`startRecording(to:outputFileType:recordingDelegate:)`](/documentation/AVFoundation/AVCaptureAudioFileOutput/startRecording(to:outputFileType:recordingDelegate:))

Tells the receiver to start recording to a new file of the specified format, and specifies a delegate that will be notified when recording is finished.

### Configuring output

[`audioSettings`](/documentation/AVFoundation/AVCaptureAudioFileOutput/audioSettings)

The settings used to decode or re-encode audio before it is output by the receiver.

[`metadata`](/documentation/AVFoundation/AVCaptureAudioFileOutput/metadata)

A collection of metadata to be written to the receiver’s output files.

### Creating output

[`init()`](/documentation/AVFoundation/AVCaptureAudioFileOutput/init())

Creates a new audio file output.

[`new`](/documentation/AVFoundation/AVCaptureAudioFileOutput/new)

Creates a new audio file output.



---

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)