Voice Input
object VoiceInput
Helpers for voice input. Android speech recognition runs in another app and returns through an Activity result, so the SDK does not record audio itself:
Launch buildRecognitionIntent with an Activity Result launcher.
Read the text with extractTranscript.
Pass it to A2aSession.sendMessage with the recognition locale as
locale.
Functions
Link copied to clipboard
fun buildRecognitionIntent(localeTag: String, prompt: String? = null, preferOffline: Boolean = false): Intent
Link copied to clipboard
Best transcript from the recognizer's result, or null if there is none (cancelled or empty).