# SpeechSynthesis


```
public static class SpeechSynthesis
```

<br />

*** ** * ** ***

Entry point to obtain a `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` for text-to-speech operations.

## Summary

| ### Public fields |
|---|---|
| `static @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesis` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesis#INSTANCE()` |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesis#getClient(com.google.mlkit.genai.texttospeech.SpeechSynthesizerOptions)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions options)` Creates an instance of `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` with the specified configuration options. |

## Public fields

### INSTANCE

```
public static @NonNull SpeechSynthesis INSTANCE
```

## Public methods

### getClient

```
public static final @NonNull SpeechSynthesizer getClient(@NonNull SpeechSynthesizerOptions options)
```

Creates an instance of `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` with the specified configuration options.

One client is enough for an app that speaks several languages: `options.locale` is only a default, which `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizer#getSupportedVoices(java.util.Locale)` accepts an override for.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions options` | The settings for text-to-speech. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` | A new `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` client. |