provider(from:in:compatibleWith:priority:)
Returns an input sequence provider that reads from an audio capture device.
Declaration
static func provider(from captureDevice: AVCaptureDevice, in session: AVCaptureSession, compatibleWith modules: [any SpeechModule], priority: TaskPriority? = nil) async throws -> CaptureInputSequenceProviderParameters
- captureDevice:
The capture device to use.
- session:
The capture session that manages the audio capture operation.
- modules:
The speech modules that will analyze the audio.
- priority:
The desired priority of the audio-capture task.
Return Value
An instance of this class.
Discussion
This method also creates an AVCaptureAudioDataOutput object suitable for adding to an existing AVCaptureSession. It does not reconfigure or alter the session.
Use the captureAudioDataOutput property to access the output object and add it to your session.