# SpeechSynthesizerRequest


```
public final class SpeechSynthesizerRequest
```

<br />

*** ** * ** ***

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

## Summary

| ### Nested types |
|---|
| `public sealed class https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input` The input to be synthesized. |
| `public final class https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input.Earcon extends https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input` An earcon input containing the name of the earcon to play. |
| `public final class https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input.PreRecordedSpeech extends https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input` A speech input containing the text string mapped to a pre-recorded audio file. |
| `public final class https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input.Text extends https://developers.google.com/android/reference/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) public annotation https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.QueueMode` The queue mode annotation. |

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest#SpeechSynthesizerRequest(com.google.mlkit.genai.texttospeech.SpeechSynthesizerRequest.Input,android.media.AudioAttributes,kotlin.Int)( @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input input, @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/android/media/AudioAttributes.html audioAttributes, @https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.QueueMode int queueMode )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/android/media/AudioAttributes.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest#getAudioAttributes()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest.Input` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest#getInput()()` |
| `final int` | `https://developers.google.com/android/reference/com/google/mlkit/genai/texttospeech/SpeechSynthesizerRequest#getQueueMode()()` |

## Public constructors

### SpeechSynthesizerRequest

```
public SpeechSynthesizerRequest(
    @NonNull SpeechSynthesizerRequest.Input input,
    @NonNull AudioAttributes audioAttributes,
    @SpeechSynthesizerRequest.QueueMode int queueMode
)
```

## Public methods

### getAudioAttributes

```
public final @NonNull AudioAttributes getAudioAttributes()
```

### getInput

```
public final @NonNull SpeechSynthesizerRequest.Input getInput()
```

### getQueueMode

```
public final int getQueueMode()
```