Namespace Glitch9.AIDevKit.OpenAI.Realtime
Classes
- RealtimeEvent
Handles all the different types of
Realtime APIevents that can be sent to or received from the OpenAI API.
- RealtimeItem
A realtime Item is of three types: message, function_call, or function_call_output.
A message item can contain text or audio.
A function_call item indicates a model's desire to call a tool.
A function_call_output item indicates a function response.
The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete.
- RealtimeItemContent
The content part that is done.
- RealtimeSession
A session refers to a single WebSocket connection between a client and the server.
Once a client creates a session, it then sends JSON-formatted events containing text and audio chunks. The server will respond in kind with audio containing voice output, a text transcript of that voice output, and function calls (if functions are provided by the client).
A realtime Session represents the overall client-server interaction, and contains default configuration.
It has a set of default values which can be updated at any time (via session.update) or on a per-response level (via response.create).
- TurnDetection
Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to null to turn off, in which case the client must manually trigger model response.
Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.
Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability.
For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.