# SpeechTranslatorOptions.Builder


```
class SpeechTranslatorOptions.Builder
```

<br />

*** ** * ** ***

Builder for `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/SpeechTranslatorOptions`.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/SpeechTranslatorOptions.Builder#Builder(java.util.Locale,java.util.Locale)(sourceLocale: https://developer.android.com/reference/java/util/Locale.html, targetLocale: https://developer.android.com/reference/java/util/Locale.html)` |

| ### Public functions |
|---|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/SpeechTranslatorOptions` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/SpeechTranslatorOptions.Builder#build()()` Builds the `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/SpeechTranslatorOptions` instance. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/java/util/concurrent/Executor.html?` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/SpeechTranslatorOptions.Builder#executor()` The custom `https://developer.android.com/reference/java/util/concurrent/Executor.html` to use. |

## Public constructors

### Builder

```
Builder(sourceLocale: Locale, targetLocale: Locale)
```

## Public functions

### build

```
fun build(): SpeechTranslatorOptions
```

Builds the `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/speechtranslation/SpeechTranslatorOptions` instance.

## Public properties

### executor

```
var executor: Executor?
```

The custom `https://developer.android.com/reference/java/util/concurrent/Executor.html` to use. If no `https://developer.android.com/reference/java/util/concurrent/Executor.html` is set, an internal background thread pool will be used.

Most clients should not need to call this method.