SpeechTranslatorOptions.Builder

public final class SpeechTranslatorOptions.Builder


Builder for SpeechTranslatorOptions.

Summary

Public constructors

Builder(@NonNull Locale sourceLocale, @NonNull Locale targetLocale)

Public methods

final @NonNull SpeechTranslatorOptions

Builds the SpeechTranslatorOptions instance.

final Executor

The custom Executor to use.

final void

The custom Executor to use.

Public constructors

Builder

public Builder(@NonNull Locale sourceLocale, @NonNull Locale targetLocale)

Public methods

build

public final @NonNull SpeechTranslatorOptions build()

Builds the SpeechTranslatorOptions instance.

getExecutor

public final Executor getExecutor()

The custom Executor to use. If no Executor is set, an internal background thread pool will be used.

Most clients should not need to call this method.

setExecutor

public final void setExecutor(Executor executor)

The custom Executor to use. If no Executor is set, an internal background thread pool will be used.

Most clients should not need to call this method.