Microphone
Microphone interface allows the platform to define a source for audio. The microphone can be used to stream audio data from the platform to the Mapbox SDK.
Types
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Stops streaming audio from the microphone and causes stream to exit. The state flow will move to State.Idle.
Link copied to clipboard
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.