SpeechSynthesisRequest

data class SpeechSynthesisRequest(val text: String, val languageTag: String, val voiceId: String? = null, val rate: Float = 1.0f, val pitch: Float = 1.0f)

One piece of text to speak.

Constructors

Link copied to clipboard
constructor(text: String, languageTag: String, voiceId: String? = null, rate: Float = 1.0f, pitch: Float = 1.0f)

Properties

Link copied to clipboard

The BCP 47 language of text, such as en-US. Used to pick a voice when voiceId is null.

Link copied to clipboard

The voice pitch, where 1 is normal.

Link copied to clipboard
val rate: Float

The speaking rate, where 1 is normal speed.

Link copied to clipboard

The text to speak.

Link copied to clipboard

The SpeechVoice.id to speak with, or null to let the engine choose one for languageTag.