stream
abstract suspend fun stream(consumer: (Microphone.State.Streaming) -> Unit)
Content copied to clipboard
Starts streaming audio from the microphone. The audio is streamed in chunks and surfaced through the consumer lambda as well as the state flow. The consumer lambda will use State.Streaming to process the audio data. The state flow can be used to share the streaming bytes for multiple uses.
The stream will block while streaming. The stream will stop when stop is called, or when some event causes the stream to stop streaming.