# SpeechSynthesizerRequest


```
data class SpeechSynthesizerRequest
```

<br />

*** ** * ** ***

Represents a request to synthesize speech using `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizer`.

## Summary

| ### Nested types |
|---|
| `sealed class https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input` The input to be synthesized. |
| `data class https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input.Earcon : https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input` An earcon input containing the name of the earcon to play. |
| `data class https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input.PreRecordedSpeech : https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input` A speech input containing the text string mapped to a pre-recorded audio file. |
| `data class https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input.Text : https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input` A text input containing the raw string to be synthesized. |
| `@https://developer.android.com/reference/androidx/annotation/IntDef.html(value = [0, 1]) @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.annotation/-retention/index.html(value = https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.annotation/-annotation-retention/-b-i-n-a-r-y/index.html) annotation https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.QueueMode` The queue mode annotation. |

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest#SpeechSynthesizerRequest(com.google.mlkit.genai.texttospeech.SpeechSynthesizerRequest.Input,android.media.AudioAttributes,kotlin.Int)( input: https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input, audioAttributes: https://developer.android.com/reference/android/media/AudioAttributes.html, @https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.QueueMode queueMode: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html )` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/android/media/AudioAttributes.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest#audioAttributes()` |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest#input()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest#queueMode()` |

## Public constructors

### SpeechSynthesizerRequest

```
SpeechSynthesizerRequest(
    input: SpeechSynthesizerRequest.Input,
    audioAttributes: AudioAttributes,
    @SpeechSynthesizerRequest.QueueMode queueMode: Int = QueueMode.QUEUE_ADD
)
```

## Public properties

### audioAttributes

```
val audioAttributes: AudioAttributes
```

### input

```
val input: SpeechSynthesizerRequest.Input
```

### queueMode

```
val queueMode: Int
```