stream

fun AudioCapture.stream(config: CaptureConfig = CaptureConfig()): Flow<AudioChunk>(source)

Streams raw PCM for as long as the flow is collected.

The microphone opens when collection starts and closes when the collector is cancelled, so the capture cannot outlive the code that uses it. Any CaptureConfig.file is ignored: use AudioCapture.start when you also need a recording.