# com.google.mlkit.genai.texttospeech

## Classes

|---|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizer` | Performs on-device text-to-speech audio synthesis. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions` | Configuration options for `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/SpeechSynthesizerOptions.Builder` | Builder for `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions`. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest` | Represents a request to synthesize speech using `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/SpeechSynthesizerRequest.Input` | The input to be synthesized. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input.Earcon` | An earcon input containing the name of the earcon to play. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input.PreRecordedSpeech` | A speech input containing the text string mapped to a pre-recorded audio file. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input.Text` | A text input containing the raw string to be synthesized. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerResponse` | Represents output events emitted during a speech synthesis session. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerResponse.AudioAvailable` | Emitted when a chunk of synthesized audio is available. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerResponse.Error` | Emitted when an error occurs during speech synthesis. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerResponse.StatusUpdate` | Emitted when the lifecycle status of the synthesis changes. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/VoiceInfo` | Represents information about a supported text-to-speech voice. |

## Objects

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

## Annotations

|---|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.QueueMode` | The queue mode annotation. |

## Enums

|---|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerResponse.Status` | Lifecycle status of the speech synthesis request. |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/VoiceInfo.Gender` | The gender of a voice. |

## Top-level functions summary

|---|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/package-summary#speechSynthesizerOptions(java.util.Locale,kotlin.Function1)(locale: https://developer.android.com/reference/java/util/Locale.html, init: https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions.Builder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` DSL helper to configure and build `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions`. |

## Top-level functions

### speechSynthesizerOptions

```
fun speechSynthesizerOptions(locale: Locale, init: SpeechSynthesizerOptions.Builder.() -> Unit = {}): SpeechSynthesizerOptions
```

DSL helper to configure and build `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerOptions`.