SpeechOptions

@Serializable
data class SpeechOptions(val instructions: String? = null, val streamFormat: SpeechStreamFormat? = null, val customVoice: CustomVoice? = null)

Additional controls for modern speech models.

Constructors

Link copied to clipboard
constructor(instructions: String? = null, streamFormat: SpeechStreamFormat? = null, customVoice: CustomVoice? = null)

Properties

Link copied to clipboard
@SerialName(value = "voice")
val customVoice: CustomVoice? = null

Custom voice reference, replacing the request's built-in voice when supplied.

Link copied to clipboard
val instructions: String? = null

Voice delivery instructions; model support varies.

Link copied to clipboard
@SerialName(value = "stream_format")
val streamFormat: SpeechStreamFormat? = null

Response framing; streaming methods choose their required framing.