python/resources/realtime/methods/connect/index.md +0 −33 deleted
File Deleted View Diff
1##
2
3`realtime.connect(RealtimeConnectParams**kwargs)`
4
5**** ``
6
7The Realtime API enables you to build low-latency, multi-modal conversational experiences. It currently supports text and audio as both input and output, as well as function calling.
8
9Some notable benefits of the API include:
10
11- Native speech-to-speech: Skipping an intermediate text format means low latency and nuanced output.
12- Natural, steerable voices: The models have natural inflection and can laugh, whisper, and adhere to tone direction.
13- Simultaneous multimodal output: Text is useful for moderation; faster-than-realtime audio ensures stable playback.
14
15The Realtime API is a stateful, event-based API that communicates over a WebSocket.
16
17### Parameters
18
19- `call_id: Optional[str]`
20
21- `model: Optional[str]`
22
23### Example
24
25```python
26import os
27from openai import OpenAI
28
29client = OpenAI(
30 api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
31)
32client.realtime.connect()
33```