MicrophoneMiddleware

Preferred way to implement a microphone middleware. Alternatively, you can implement PlatformMicrophoneMiddleware directly.

Extending the CoroutineMiddleware class gives access to CoroutineContext bound to the Middleware lifecycle.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val state: StateFlow<PlatformMicrophone.State>

Functions

Link copied to clipboard
fun detach()
Link copied to clipboard
abstract fun hasPermission(): Boolean
Link copied to clipboard
abstract fun onAttached(middlewareContext: MapGptCoreContext)
Link copied to clipboard
abstract fun onDetached(middlewareContext: MapGptCoreContext)
Link copied to clipboard
abstract fun stop()
Link copied to clipboard
abstract suspend fun stream(consumer: (PlatformMicrophone.State.Streaming) -> Unit)