<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioRecorder",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioRecorder"
  },
  "title" : "AVAudioRecorder"
}
-->

# AVAudioRecorder

An object that records audio data to a file.

```
class AVAudioRecorder
```

## Overview

Use an audio recorder to:

- Record audio from the system’s active input device
- Record for a specified duration or until the user stops recording
- Pause and resume a recording
- Access recording-level metering data

To record audio in iOS or tvOS, configure your audio session to use the [`record`](/documentation/AVFAudio/AVAudioSession/Category-swift.struct/record) or [`playAndRecord`](/documentation/AVFAudio/AVAudioSession/Category-swift.struct/playAndRecord) category.

> Important:
> For more advanced recording capabilities, like applying signal processing to recorded audio, use ``doc://com.apple.avfaudio/documentation/AVFAudio/AVAudioEngine`` instead.

## Topics

### Creating an audio recorder

[`init(url:settings:)`](/documentation/AVFAudio/AVAudioRecorder/init(url:settings:)-5whyq)

Creates an audio recorder with settings.

[`init(url:format:)`](/documentation/AVFAudio/AVAudioRecorder/init(url:format:)-7herw)

Creates an audio recorder with an audio format.

### Controlling recording

[`prepareToRecord()`](/documentation/AVFAudio/AVAudioRecorder/prepareToRecord())

Creates an audio file and prepares the system for recording.

[`record()`](/documentation/AVFAudio/AVAudioRecorder/record())

Starts or resumes audio recording.

[`record(atTime:)`](/documentation/AVFAudio/AVAudioRecorder/record(atTime:))

Records audio starting at a specific time.

[`record(forDuration:)`](/documentation/AVFAudio/AVAudioRecorder/record(forDuration:))

Records audio for the indicated duration of time.

[`record(atTime:forDuration:)`](/documentation/AVFAudio/AVAudioRecorder/record(atTime:forDuration:))

Records audio starting at a specific time for the indicated duration.

[`pause()`](/documentation/AVFAudio/AVAudioRecorder/pause())

Pauses an audio recording.

[`stop()`](/documentation/AVFAudio/AVAudioRecorder/stop())

Stops recording and closes the audio file.

[`isRecording`](/documentation/AVFAudio/AVAudioRecorder/isRecording)

A Boolean value that indicates whether the audio recorder is recording.

[`deleteRecording()`](/documentation/AVFAudio/AVAudioRecorder/deleteRecording())

Deletes a recorded audio file.

### Accessing recorder timing

[`currentTime`](/documentation/AVFAudio/AVAudioRecorder/currentTime)

The time, in seconds, since the beginning of the recording.

[`deviceCurrentTime`](/documentation/AVFAudio/AVAudioRecorder/deviceCurrentTime)

The time, in seconds, of the host audio device.

### Managing audio channels

[`channelAssignments`](/documentation/AVFAudio/AVAudioRecorder/channelAssignments)

An array of channel descriptions associated with the audio recorder.

### Managing audio-level metering

[`isMeteringEnabled`](/documentation/AVFAudio/AVAudioRecorder/isMeteringEnabled)

A Boolean value that indicates whether you’ve enabled the recorder to generate audio-level metering data.

[`updateMeters()`](/documentation/AVFAudio/AVAudioRecorder/updateMeters())

Refreshes the average and peak power values for all channels of an audio recorder.

[`averagePower(forChannel:)`](/documentation/AVFAudio/AVAudioRecorder/averagePower(forChannel:))

Returns the average power, in decibels full-scale (dBFS), for an audio channel.

[`peakPower(forChannel:)`](/documentation/AVFAudio/AVAudioRecorder/peakPower(forChannel:))

Returns the peak power, in decibels full-scale (dBFS), for an audio channel.

### Responding to recorder events

[`delegate`](/documentation/AVFAudio/AVAudioRecorder/delegate)

The delegate object for the audio recorder.

[`AVAudioRecorderDelegate`](/documentation/AVFAudio/AVAudioRecorderDelegate)

A protocol that defines the methods to respond to audio recording events and encoding errors.

### Inspecting the audio data

[`url`](/documentation/AVFAudio/AVAudioRecorder/url)

The URL to which the recorder writes its data.

[`format`](/documentation/AVFAudio/AVAudioRecorder/format)

The format of the recorded audio.

[`settings`](/documentation/AVFAudio/AVAudioRecorder/settings)

The settings that describe the format of the recorded audio.



---

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)