SpeechRecognizerOptions.Mode

@IntDef(value = [0, 1])
@Retention(value = AnnotationRetention.BINARY)
annotation SpeechRecognizerOptions.Mode


Defines options for execution mode.

Mode constants - enumeration of supported Mode:

Summary

Constants

const Int

Indicates the advanced mode of the speech recognizer.

const Int

Indicates the basic mode of the speech recognizer.

Public constructors

Constants

MODE_ADVANCED

const val MODE_ADVANCED = 1: Int

Indicates the advanced mode of the speech recognizer.

Uses an on-device GenAI model to produce higher quality recognition results with broader language coverage, at the cost of slightly higher latency.

Note: This mode is only available on supported high-end devices. You can check availability by calling SpeechRecognizer.checkStatus on a recognizer configured with MODE_ADVANCED.

MODE_BASIC

const val MODE_BASIC = 0: Int

Indicates the basic mode of the speech recognizer.

Uses the standard on-device speech recognition models (the same underlying engine that backs Android's on-device SpeechRecognizer), prioritizing low latency and broad device compatibility. Requires downloading language packs per locale.

Public constructors

Mode

Mode()