---
title: AVAudioRecorder
framework: avfaudio
role: symbol
role_heading: Class
path: avfaudio/avaudiorecorder
---

# AVAudioRecorder

An object that records audio data to a file.

## Declaration

```swift
class AVAudioRecorder
```

## Mentioned in

Routing audio to specific devices in multidevice sessions

## Overview

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 or playAndRecord category. important: For more advanced recording capabilities, like applying signal processing to recorded audio, use AVAudioEngine instead.

## Topics

### Creating an audio recorder

- [init(url:settings:)](avfaudio/avaudiorecorder/init(url:settings:)-5whyq.md)
- [init(url:format:)](avfaudio/avaudiorecorder/init(url:format:)-7herw.md)

### Controlling recording

- [prepareToRecord()](avfaudio/avaudiorecorder/preparetorecord().md)
- [record()](avfaudio/avaudiorecorder/record().md)
- [record(atTime:)](avfaudio/avaudiorecorder/record(attime:).md)
- [record(forDuration:)](avfaudio/avaudiorecorder/record(forduration:).md)
- [record(atTime:forDuration:)](avfaudio/avaudiorecorder/record(attime:forduration:).md)
- [pause()](avfaudio/avaudiorecorder/pause().md)
- [stop()](avfaudio/avaudiorecorder/stop().md)
- [isRecording](avfaudio/avaudiorecorder/isrecording.md)
- [deleteRecording()](avfaudio/avaudiorecorder/deleterecording().md)

### Accessing recorder timing

- [currentTime](avfaudio/avaudiorecorder/currenttime.md)
- [deviceCurrentTime](avfaudio/avaudiorecorder/devicecurrenttime.md)

### Managing audio channels

- [channelAssignments](avfaudio/avaudiorecorder/channelassignments.md)

### Managing audio-level metering

- [isMeteringEnabled](avfaudio/avaudiorecorder/ismeteringenabled.md)
- [updateMeters()](avfaudio/avaudiorecorder/updatemeters().md)
- [averagePower(forChannel:)](avfaudio/avaudiorecorder/averagepower(forchannel:).md)
- [peakPower(forChannel:)](avfaudio/avaudiorecorder/peakpower(forchannel:).md)

### Responding to recorder events

- [delegate](avfaudio/avaudiorecorder/delegate.md)
- [AVAudioRecorderDelegate](avfaudio/avaudiorecorderdelegate.md)

### Inspecting the audio data

- [url](avfaudio/avaudiorecorder/url.md)
- [format](avfaudio/avaudiorecorder/format.md)
- [settings](avfaudio/avaudiorecorder/settings.md)

### Initializers

- [init(URL:format:)](avfaudio/avaudiorecorder/init(url:format:)-hpsc.md)
- [init(URL:settings:)](avfaudio/avaudiorecorder/init(url:settings:)-9zay9.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Basic playback and recording

- [AVAudioPlayer](avfaudio/avaudioplayer.md)
- [AVMIDIPlayer](avfaudio/avmidiplayer.md)
