SpeechRecognitionConfiguration

data class SpeechRecognitionConfiguration(val locale: Locale, val preferOnDevice: Boolean = true, val reportsAlternatives: Boolean = true, val requestsWordDetails: Boolean = true, val completeSilenceMillis: Long? = null, val maxAlternatives: Int = DEFAULT_MAX_ALTERNATIVES)

Settings for one speech recognition run.

Constructors

Link copied to clipboard
constructor(locale: Locale, preferOnDevice: Boolean = true, reportsAlternatives: Boolean = true, requestsWordDetails: Boolean = true, completeSilenceMillis: Long? = null, maxAlternatives: Int = DEFAULT_MAX_ALTERNATIVES)

Properties

Link copied to clipboard

A hint for how long the speaker must be silent before the input is considered complete, or null to use the recognizer's default.

Link copied to clipboard

The language to recognize.

Link copied to clipboard

The maximum number of transcriptions to request when reportsAlternatives is true; the best one plus alternatives.

Link copied to clipboard

Use on-device recognition when it is available, falling back to the system recognizer's offline preference otherwise.

Link copied to clipboard

Whether to report other plausible transcriptions.

Link copied to clipboard

Whether to request per-word confidence and timing where the platform supports it (Android 14 and later).