RealtimeVoiceConfig
data class RealtimeVoiceConfig(val instructions: String? = null, val voice: String? = null, val modalities: Set<RealtimeModality> = setOf(RealtimeModality.AUDIO, RealtimeModality.TEXT), val audioFormat: RealtimeAudioFormat = RealtimeAudioFormat.PCM16, val turnDetection: VadConfig = VadConfig.Server(), val tools: List<LlmTool> = emptyList(), val toolChoice: ToolChoice = ToolChoice.Auto, val temperature: Double? = null, val maxResponseOutputTokens: Int? = null, val inputAudioTranscriptionModel: String? = "whisper-1", val providerExtras: Map<String, String> = emptyMap())
Vendor-neutral configuration for a realtime voice session.
Maps onto a provider's session-config message (for OpenAI Realtime, the initial session.update event). Only the cross-port subset is surfaced; provider-specific knobs go through providerExtras.
Constructors
Link copied to clipboard
constructor(instructions: String? = null, voice: String? = null, modalities: Set<RealtimeModality> = setOf(RealtimeModality.AUDIO, RealtimeModality.TEXT), audioFormat: RealtimeAudioFormat = RealtimeAudioFormat.PCM16, turnDetection: VadConfig = VadConfig.Server(), tools: List<LlmTool> = emptyList(), toolChoice: ToolChoice = ToolChoice.Auto, temperature: Double? = null, maxResponseOutputTokens: Int? = null, inputAudioTranscriptionModel: String? = "whisper-1", providerExtras: Map<String, String> = emptyMap())
Properties
Link copied to clipboard
Sample format used for ingress and egress audio.
Link copied to clipboard
Link copied to clipboard
System prompt analogue for the session.
Link copied to clipboard
Cap on tokens per assistant response.
Link copied to clipboard
Output modalities the model should produce. Defaults to [audio, text].
Link copied to clipboard
Escape hatch for provider-specific options; merged verbatim into the gateway's session-update payload.
Link copied to clipboard
Sampling temperature, when supported.
Link copied to clipboard
Provider-neutral tool-choice hint.
Link copied to clipboard
Voice-activity-detection strategy.