Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/realtime-translation-openai-api-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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