Converting pipeline frames to RTVI protocol messages
RTVIObserver
translates Pipecat’s internal pipeline events into standardized RTVI protocol messages. It monitors frame flow through the pipeline and generates corresponding client messages based on event types.
RTVIObserver
serves two main functions:
Pipeline Frame | RTVI Message |
---|---|
Speech Events | |
UserStartedSpeakingFrame | RTVIUserStartedSpeakingMessage |
UserStoppedSpeakingFrame | RTVIUserStoppedSpeakingMessage |
BotStartedSpeakingFrame | RTVIBotStartedSpeakingMessage |
BotStoppedSpeakingFrame | RTVIBotStoppedSpeakingMessage |
Transcription | |
TranscriptionFrame | RTVIUserTranscriptionMessage(final=true) |
InterimTranscriptionFrame | RTVIUserTranscriptionMessage(final=false) |
LLM Processing | |
LLMFullResponseStartFrame | RTVIBotLLMStartedMessage |
LLMFullResponseEndFrame | RTVIBotLLMStoppedMessage |
LLMTextFrame | RTVIBotLLMTextMessage |
TTS Events | |
TTSStartedFrame | RTVIBotTTSStartedMessage |
TTSStoppedFrame | RTVIBotTTSStoppedMessage |
TTSTextFrame | RTVIBotTTSTextMessage |
Context/Metrics | |
OpenAILLMContextFrame | RTVIUserLLMTextMessage |
MetricsFrame | RTVIMetricsMessage |
RTVIServerMessageFrame | RTVIServerMessage |