SpeechTranslatorOptions

public final class SpeechTranslatorOptions


Options for SpeechTranslator.

Summary

Nested types

Builder for SpeechTranslatorOptions.

Public methods

static final @NonNull SpeechTranslatorOptions.Builder
builder(@NonNull Locale sourceLocale, @NonNull Locale targetLocale)

Creates a new Builder translating from sourceLocale to targetLocale.

final Executor
final @NonNull Locale
final @NonNull Locale

Public methods

builder

public static final @NonNull SpeechTranslatorOptions.Builder builder(@NonNull Locale sourceLocale, @NonNull Locale targetLocale)

Creates a new Builder translating from sourceLocale to targetLocale.

Translation is bidirectional: audio tagged with either locale may be sent in the same session, and is translated into the other.

getExecutor

public final Executor getExecutor()

getSourceLocale

public final @NonNull Locale getSourceLocale()

getTargetLocale

public final @NonNull Locale getTargetLocale()