---
title: "provider(from:in:compatibleWith:priority:)"
framework: speech
role: symbol
role_heading: Type Method
path: "speech/captureinputsequenceprovider/provider(from:in:compatiblewith:priority:)"
---

# provider(from:in:compatibleWith:priority:)

Returns an input sequence provider that reads from an audio capture device.

## Declaration

```swift
static func provider(from captureDevice: AVCaptureDevice, in session: AVCaptureSession, compatibleWith modules: [any SpeechModule], priority: TaskPriority? = nil) async throws -> CaptureInputSequenceProvider
```

## Parameters

- `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

Return Value An instance of this class.

## Discussion

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.

## See Also

### Creating a provider

- [providerWithSession(from:compatibleWith:priority:)](speech/captureinputsequenceprovider/providerwithsession(from:compatiblewith:priority:).md)
- [init(session:analyzerFormat:priority:)](speech/captureinputsequenceprovider/init(session:analyzerformat:priority:).md)
