---
title: "presentAudioRecorderController(withOutputURL:preset:options:completion:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfacecontroller/presentaudiorecordercontroller(withoutputurl:preset:options:completion:)"
---

# presentAudioRecorderController(withOutputURL:preset:options:completion:)

Display a standard interface for recording audio from the user’s Apple Watch.

## Declaration

```swift
func presentAudioRecorderController(withOutputURL URL: URL, preset: WKAudioRecorderPreset, options: [AnyHashable : Any]? = nil, completion: @escaping (Bool, (any Error)?) -> Void)
```

```swift
func presentAudioRecorderController(withOutputURL URL: URL, preset: WKAudioRecorderPreset, options: [AnyHashable : Any]? = nil) async throws -> Bool
```

## Parameters

- `URL`: The URL at which to store the recorded output. The filename extension determines the type of audio to record. You may specify the extensions .wav, .mp4, and .m4a.
- `preset`: The recording quality. Specify the constant that best represents the type of audio you want to record. For a list of possible values, see doc://com.apple.watchkit/documentation/WatchKit/WKAudioRecorderPreset.
- `options`: A dictionary of options to use during recording. If you specify nil for this parameter, the audio recording interface uses the default options. For a list of keys and values you can include in the dictionary, see doc://com.apple.watchkit/documentation/WatchKit/audio-recording-options.
- `completion`: The block to execute when recording ends. Use this block to determine the status of the recording and to perform any cleanup. This block has no return value and takes the following parameters:

## Mentioned in

Navigating Between Scenes

## Discussion

Discussion Use this method to obtain recorded audio from the user. This method executes asynchronously, returning shortly after you call it. During a subsequent run loop cycle, the system displays the audio recording controller to the user. The interface includes a Cancel button to dismiss the interface, and controls to manage recording. After some audio has been recorded, the interface displays the title string specified in the WKAudioRecorderControllerOptionsActionTitleKey option so that the user can accept the content and save it to the specified URL. When the user taps the Cancel button or your title string, WatchKit automatically dismisses the audio recording interface controller. When the user dismisses the interface, or when you dismiss it programmatically, the system calls your completion block. Use that block to process the results. Always call this method from your WatchKit extension’s main thread. When specifying a filename with the .wav extension, the resulting audio format is LPCM. For all other file types, the audio format is AAC. For information about the audio recording options, see the values for WKAudioRecorderPreset. note: Do not attempt to record audio while gathering heart rate data using Health Kit. If you present a media interface, WatchKit automatically disables the gathering of heart rate data.

## See Also

### Presenting video and audio interfaces

- [presentMediaPlayerController(with:options:completion:)](watchkit/wkinterfacecontroller/presentmediaplayercontroller(with:options:completion:).md)
- [Media Player Options](watchkit/media-player-options.md)
- [dismissMediaPlayerController()](watchkit/wkinterfacecontroller/dismissmediaplayercontroller().md)
- [WKAudioRecorderPreset](watchkit/wkaudiorecorderpreset.md)
- [Audio Recording Options](watchkit/audio-recording-options.md)
- [dismissAudioRecorderController()](watchkit/wkinterfacecontroller/dismissaudiorecordercontroller().md)
