SpeechModelAssets

Inspects and requests the on-device speech recognition models for a language.

Requires Android 13 (API 33); on older versions status returns Status.Unknown and requestDownload does nothing.

Types

Link copied to clipboard

Whether the on-device model for a language is ready.

Functions

Link copied to clipboard
fun requestDownload(context: Context, locale: Locale, logger: KommonLogger = NoOpLogger)

Asks the system to download the on-device model for locale.

Link copied to clipboard
suspend fun status(context: Context, locale: Locale, logger: KommonLogger = NoOpLogger): SpeechModelAssets.Status

The on-device model status for locale.