SpeechInput

@Composable
fun SpeechInput(onTranscript: (text: String, isFinal: Boolean) -> Unit, modifier: Modifier = Modifier, state: SpeechInputState = rememberSpeechInputState(), locale: Locale? = null, onCancel: () -> Unit? = null)(source)

Voice input (AI Elements <SpeechInput>): tap to dictate, tap again to stop. onTranscript receives partial text while speaking and the final text (isFinal = true) at the end. With onCancel, dictation shows the input level with cancel (drop what was heard; restore your text in onCancel) and done. Asks for the microphone permission the first time; the host app must declare RECORD_AUDIO in its manifest.