# SpeechSynthesizerOptions


```
public final class SpeechSynthesizerOptions
```

<br />

*** ** * ** ***

Configuration options for `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizer`.

## Summary

| ### Nested types |
|---|
| `public final class https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions.Builder` Builder for `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions`. |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions.Builder` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions#builder(java.util.Locale)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/util/Locale.html locale)` Creates a new `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions.Builder` with the specified `https://developer.android.com/reference/java/util/Locale.html`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html, @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/android/net/Uri.html>` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions#getEarcons()()` |
| `final https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions#getExecutor()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/util/Locale.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions#getLocale()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html, @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/android/net/Uri.html>` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions#getSpeeches()()` |
| `final boolean` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions#getVoiceFallbackEnabled()()` |

## Public methods

### builder

```
public static final @NonNull SpeechSynthesizerOptions.Builder builder(@NonNull Locale locale)
```

Creates a new `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions.Builder` with the specified `https://developer.android.com/reference/java/util/Locale.html`.

### getEarcons

```
public final @NonNull Map<@NonNull String, @NonNull Uri> getEarcons()
```

### getExecutor

```
public final Executor getExecutor()
```

### getLocale

```
public final @NonNull Locale getLocale()
```

### getSpeeches

```
public final @NonNull Map<@NonNull String, @NonNull Uri> getSpeeches()
```

### getVoiceFallbackEnabled

```
public final boolean getVoiceFallbackEnabled()
```