SpeechSynthesizerRequest

public final class SpeechSynthesizerRequest


Represents a request to synthesize speech using SpeechSynthesizer.

Summary

Nested types

public sealed class SpeechSynthesizerRequest.Input

The input to be synthesized.

An earcon input containing the name of the earcon to play.

A speech input containing the text string mapped to a pre-recorded audio file.

A text input containing the raw string to be synthesized.

@IntDef(value = [0, 1])
@Retention(value = AnnotationRetention.BINARY)
public annotation SpeechSynthesizerRequest.QueueMode

The queue mode annotation.

Public constructors

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()