2025 Audio & VideoSpatial ComputingPhotos & Camera
WWDC25 · 19 min · Audio & Video / Spatial Computing / Photos & Camera
Enhance your app’s audio recording capabilities
Learn how to improve your app’s audio recording functionality. Explore the flexibility of audio device selection using the input picker interaction on iOS and iPadOS 26. Discover APIs available for high-quality voice recording using AirPods. We’ll also introduce spatial audio recording and editing capabilities that allow you to isolate speech and ambient background sounds — all using the the AudioToolbox, AVFoundation, and Cinematic frameworks.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 4 snippets
Input route selection
import AVKit
class AppViewController {
// Configure AudioSession
// AVInputPickerInteraction is a NSObject subclass that presents an input picker
let inputPickerInteraction = AVInputPickerInteraction()
inputPickerInteraction.delegate = self
// connect the PickerInteraction to a UI element for displaying the picker
@IBOutlet weak var selectMicButton: UIButton!
self.selectMicButton.addInteraction(self.inputPickerInteraction)
// button press callback: present input picker UI
@IBAction func handleSelectMicButton(_ sender: UIButton) {
inputPickerInteraction.present()
}
} AirPods high quality recording
// AVAudioSession clients opt-in - session category option
AVAudioSessionCategoryOptions.bluetoothHighQualityRecording
// AVCaptureSession clients opt-in - captureSession property
session.configuresApplicationAudioSessionForBluetoothHighQualityRecording = true Audio Mix with AVPlayer
import Cinematic
// Audio Mix parameters (consider using UI elements to change these values)
var intensity: Float32 = 0.5 // values between 0.0 and 1.0
var style = CNSpatialAudioRenderingStyle.cinematic
// Initializes an instance of CNAssetAudioInfo for an AVAsset asynchronously
let audioInfo = try await CNAssetSpatialAudioInfo(asset: myAVAsset)
// Returns an AVAudioMix with effect intensity and rendering style.
let newAudioMix: AVAudioMix = audioInfo.audioMix(effectIntensity: intensity,
renderingStyle: style)
// Set the new AVAudioMix on your AVPlayerItem
myAVPlayerItem.audioMix = newAudioMix Get remix metadata from input file
// Get Spatial Audio remix metadata from input AVAsset
let audioInfo = try await CNAssetSpatialAudioInfo(asset: myAVAsset)
// extract the remix metadata. Set on AUAudioMix with AudioUnitSetProperty()
let remixMetadata = audioInfo.spatialAudioMixMetadata as CFData Resources
Related sessions
-
19 min -
18 min