# SpeechSynthesis


```
object SpeechSynthesis
```

<br />

*** ** * ** ***

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

## Summary

| ### Public functions |
|---|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesis#getClient(com.google.mlkit.genai.texttospeech.SpeechSynthesizerOptions)(options: https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions)` Creates an instance of `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` with the specified configuration options. |

## Public functions

### getClient

```
fun getClient(options: SpeechSynthesizerOptions): SpeechSynthesizer
```

Creates an instance of `https://developers.google.com/android/reference/kotlin/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/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizer#getSupportedVoices(java.util.Locale)` accepts an override for.

| Parameters |
|---|---|
| `options: https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions` | The settings for text-to-speech. |

| Returns |
|---|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` | A new `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` client. |