SpeechPreset

data class SpeechPreset(val name: String, val rate: String, val pitch: String, val volume: String)

Named prosody preset with rate, pitch and volume settings for SSML <prosody> generation.

The library ships with 12 built-in presets accessible via the companion object. Custom presets can be created freely:

val robot = SpeechPreset("Robot", rate = "fast", pitch = "+6st", volume = "loud")
tts.speak("Bip boup", preset = robot)

See also

Constructors

Link copied to clipboard
constructor(name: String, rate: String, pitch: String, volume: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Human-readable label (used for display / debugging).

Link copied to clipboard

SSML pitch value in semitones relative to default (e.g. "+2st", "-1st", "+0st").

Link copied to clipboard

SSML rate value: "x-slow", "slow", "medium", "fast", "x-fast", or a percentage ("85%").

Link copied to clipboard

SSML volume value: "x-soft", "soft", "medium", "loud", or "x-loud".