The OpenAIRealTimeWebRTCTransport is a fully functional RTVI Transport. It provides a framework for implementing real-time communication directly with the OpenAI Realtime API using WebRTC voice-to-voice service. It handles media device management, audio/video streams, and state management for the connection.
Below is the transport’s type definition for the OpenAI Session configuration. See the OpenAI Realtime API documentation for more details on each of the options and their defaults.
// at setup time...llmHelper = new LLMHelper({});rtviClient.registerHelper("llm", llmHelper);// the 'llm' name in this call above isn't used.//that value is specific to working with a pipecat pipeline// at time of sending message...// Send text prompt messagellmHelper.appendToMessages({ role: "user", content: "Hello OpenAI!" });