withMicrophonePermission

suspend fun <T> withMicrophonePermission(block: suspend () -> T): T

Executes the block if the microphone permission is granted, otherwise throws an AudioPermissionDeniedException.