openai · OpenAI Platform Docs
Realtime translation | OpenAI API
Implementation guide for using the OpenAI Realtime API to perform low-latency, speech-to-speech translation between different languages.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Realtime translation | OpenAI API
Implementation guide for using the OpenAI Realtime API to perform low-latency, speech-to-speech translation between different languages.
When To Use
Use when implementing low-latency voice translation features that require converting spoken input from one language into spoken output in another language using the Realtime API.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/realtime-translation-openai-api-workflow-guide.md | A guide explaining how to implement realtime translation using WebRTC or WebSocket sessions to stream audio and receive translated output. | Questions about a guide explaining how to implement realtime translation using WebRTC or WebSocket sessions to stream audio and recei... |
examples/realtime-translation-openai-api-openai-realtime-translation-nodejs-sessi.text | A Node.js Express route demonstrating how to request a client secret for realtime translation via the OpenAI API. | Exact payloads, commands, or snippets shown in A Node.js Express route demonstrating how to request a client secret for realtime translation via the OpenAI API. |
examples/realtime-translation-openai-api-openai-realtime-translation-session-fetc.text | A JavaScript code snippet demonstrating how to fetch a client secret for a realtime translation session with a specified target language. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to fetch a client secret for a realtime translation session with a specif... |
examples/realtime-translation-openai-api-websocket-javascript.text | A JavaScript WebSocket client implementation demonstrating how to connect to the OpenAI Realtime Translation API using a specific model and safety identifier. | Exact payloads, commands, or snippets shown in A JavaScript WebSocket client implementation demonstrating how to connect to the OpenAI Realtime Translation API usin... |
examples/realtime-translation-openai-api-python-websocket-connection.text | A Python code snippet demonstrating how to establish a WebSocket connection to the OpenAI Realtime Translation API using the websocket library. | Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to establish a WebSocket connection to the OpenAI Realtime Translation API us... |
examples/realtime-translation-openai-api-session-update-javascript.text | A JavaScript code snippet demonstrating how to send a session.update event to configure audio output language for the Realtime API. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to send a session.update event to configure audio output language for the... |
examples/realtime-translation-openai-api-session-update-json.text | A JSON object demonstrating a session.update event configuration for setting the output language in the OpenAI Realtime API. | Exact payloads, commands, or snippets shown in A JSON object demonstrating a session.update event configuration for setting the output language in the OpenAI Realti... |
examples/realtime-translation-openai-api-websocket-audio-append-event.text | A text snippet demonstrating the JSON structure for sending a session input audio buffer append event via WebSocket for realtime translation. | Exact payloads, commands, or snippets shown in A text snippet demonstrating the JSON structure for sending a session input audio buffer append event via WebSocket f... |
examples/realtime-translation-openai-api-websocket-session-inputaudiobuffer-appen.text | A text snippet demonstrating the JSON payload for appending base64 encoded PCM16 audio to a session input audio buffer via WebSockets. | Exact payloads, commands, or snippets shown in A text snippet demonstrating the JSON payload for appending base64 encoded PCM16 audio to a session input audio buffe... |
examples/realtime-translation-openai-api-websocket-event-handler.text | A JavaScript code snippet demonstrating how to handle WebSocket messages for session output audio deltas and transcript updates during realtime translation. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to handle WebSocket messages for session output audio deltas and transcri... |
examples/realtime-translation-openai-api-openai-realtime-translation-python-event.text | A Python code snippet demonstrating a continuous loop for processing realtime audio delta and transcript events from a WebSocket connection. | Exact payloads, commands, or snippets shown in A Python code snippet demonstrating a continuous loop for processing realtime audio delta and transcript events from... |
examples/realtime-translation-openai-api-openai-realtime-translation-audio-to-sub.text | A text-based representation of the realtime translation workflow involving source audio, translation sessions, and translated audio with subtitles. | Exact payloads, commands, or snippets shown in A text-based representation of the realtime translation workflow involving source audio, translation sessions, and tr... |
examples/realtime-translation-openai-api-workflow-logic.text | A text-based description of the audio translation workflow between two callers using the OpenAI Realtime API. | Exact payloads, commands, or snippets shown in A text-based description of the audio translation workflow between two callers using the OpenAI Realtime API. |
examples/realtime-translation-openai-api-concept-formula.text | A text representation of the mathematical formula used to calculate the number of translation sessions based on speaker tracks and target languages. | Exact payloads, commands, or snippets shown in A text representation of the mathematical formula used to calculate the number of translation sessions based on speak... |
What This Skill Covers
- Realtime translation lets you stream source audio into a dedicated translation session and receive translated audio plus transcript deltas while the speaker...
- Main sections:
How translation sessions differ,Choose a transport,Create a browser WebRTC session,Create a WebSocket session,Build listen-along translation.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/realtime-translation
