SpeechRecognizerOptions.Builder

public final class SpeechRecognizerOptions.Builder


Builder class for SpeechRecognizerOptions.

Summary

Public constructors

Public methods

final @NonNull SpeechRecognizerOptions

Builds a SpeechRecognizerOptions.

final Executor

The Executor to use, if not set, an internal background thread pool will be used.

final @NonNull Locale

The locale to use for speech recognition.

final int

The preferred mode to use for speech recognition.

final void

The Executor to use, if not set, an internal background thread pool will be used.

final void

The locale to use for speech recognition.

final void

The preferred mode to use for speech recognition.

Public constructors

Builder

public Builder()

Public methods

build

public final @NonNull SpeechRecognizerOptions build()

Builds a SpeechRecognizerOptions.

getExecutor

public final Executor getExecutor()

The Executor to use, if not set, an internal background thread pool will be used.

getLocale

public final @NonNull Locale getLocale()

The locale to use for speech recognition.

getPreferredMode

public final int getPreferredMode()

The preferred mode to use for speech recognition.

setExecutor

public final void setExecutor(Executor executor)

The Executor to use, if not set, an internal background thread pool will be used.

setLocale

public final void setLocale(@NonNull Locale locale)

The locale to use for speech recognition.

setPreferredMode

public final void setPreferredMode(@SpeechRecognizerOptions.Mode int preferredMode)

The preferred mode to use for speech recognition.