RTVI Protocol
A complete specification of the RTVI protocol for client-server communication.
Architecture
RTVI operates with two primary components, both of which are required for full functionality:- RTVIProcessor - A frame processor residing in the pipeline that serves as the entry point for sending and receiving messages to/from the client.
-
RTVIObserver - An observer that monitors pipeline events and translates them into client-compatible messages, handling:
- Speaking state changes
- Transcription updates
- LLM responses
- TTS events
- Performance metrics
Basic Example
Here’s how to set up RTVI in your Pipecat application:Protocol Flow
- Client connects and sends a
client-readymessage - Server responds with
bot-readyand initial configuration - Client and server exchange real-time events:
- Speaking state changes (
user/bot-started/stopped-speaking) - Transcriptions (
user-transcription/bot-output) - LLM processing (
bot-llm-started/stopped,bot-llm-text,llm-function-call) - TTS events (
bot-tts-started/stopped,bot-tts-text,bot-tts-audio)
- Speaking state changes (
Key Components
RTVIProcessor
Configure and manage RTVI services, actions, and client communication
RTVIObserver
Translate internal pipeline events to standardized client messages
Client Integration
RTVI is implemented in Pipecat client SDKs, providing a high-level API to interact with the protocol. Visit the Pipecat Client SDKs documentation:Client SDKs
Learn how to implement RTVI on the client-side with our JavaScript, React, and
mobile SDKs