---
title: "init(url:settings:)"
framework: avfaudio
role: symbol
role_heading: Initializer
path: "avfaudio/avaudiorecorder/init(url:settings:)-5whyq"
---

# init(url:settings:)

Creates an audio recorder with settings.

## Declaration

```swift
init(url: URL, settings: [String : Any]) throws
```

## Parameters

- `url`: The file system location to record to.
- `settings`: The audio settings to use for the recording.

## Return Value

Return Value A new audio recorder, or nil if an error occurred.

## Discussion

Discussion The system supports the following keys when defining the format settings:  |   |   |   |  The system supports additional configuration options based on your selected audio format. See Linear PCM format settings for information about customizing Linear PCM formats and Encoder settings for compressed formats.

## See Also

### Creating an audio recorder

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