Move a WebSocket client
The code that sends audio, tool results, cancels, and playback reports stays the same. Change these four things:1
Point the client at Prism
Use Prism’s address, and send your Rime API key in the same Connect from your backend, because Prism has no ephemeral keys for browsers or phones.
Authorization header. If you don’t have a key yet, sign up for Rime to create one.2
Trim the session settings
Keep For push-to-talk, set
instructions and tools, and choose a Prism voice. Remove the settings that Prism handles itself, such as transcription, audio formats, and temperature. Prism also finds the turns, so keep only interrupt_response and eagerness in turn_detection:turn_detection to null instead, as End turns yourself explains. If Prism refuses a field, the error’s param names it. The WebSocket reference says what happens to each OpenAI field.3
Send the caller's audio at 16 kHz
Prism replies at 24 kHz, as OpenAI does, but takes the caller’s audio as PCM16 at 16 kHz, mono. Resample the caller’s audio before you append it, and keep streaming it for the whole call, silence included.
4
Add a cause to the replies you start
On Prism, a Set
response.create says why it asks for a reply. The most common one is the reply after a tool result:prism_parent_response_id to the response.id of the reply that made the calls. Send it after that reply’s response.done and a conversation.item.created for each result. Typed text and greetings have their own causes, as Typed turns and nudges shows. The reply to a turn that your backend ended itself needs no cause.response.text.delta instead of response.audio_transcript.delta, and take tool arguments from response.function_call_arguments.done. If your client uses OpenAI’s current event names, such as response.output_audio.delta, map them to the beta names.
Move a LiveKit agent
Install the Rime plugin with therealtime extra, as the LiveKit quickstart shows. Then change the model that you pass to AgentSession:
RIME_API_KEY on your backend. Remove any vad or turn_detection settings from AgentSession, because Prism finds the end of each turn. Your Agent, its instructions, and its @function_tool tools stay the same.
Move a Pipecat agent
Keep your transport andLLMContext. Install the pinned preview from the Pipecat quickstart, then use RimeRealtimeLLMService and create its aggregator pair:
user before the Rime service and assistant after your output transport. Prism detects turns. The quickstart explains tool results, estimated playback positions, and tool updates and handoffs.
Switch to the Rime SDK
If your backend uses OpenAI’s SDK, switch to the Rime SDK in Python, Node.js, Go, or Rust. Its conversation runner plays each reply and stops playback when the caller talks over it, so your client’s playback and interruption code goes away:Check that it works
Make one call. You should seesession.updated, then input_audio_buffer.speech_started and speech_stopped while you talk, and then Prism’s reply, ending with a response.done whose status is completed. If an error arrives, its code says what to fix, as Errors and limits explains.
What you can add next
Once your agent runs on Prism, you can:- Adapt your instructions with Prism’s rules for speech, and test them on your calls.
- Set what Prism says while each tool runs, or choose silence.
- Lower the volume as soon as the caller may be speaking.
- Send the caller’s words as text, or have Prism speak first.
- Label every reply with your own IDs.

