Websocket

Realtime agent communication over websocket

Previously introduced TwilioAudioAdapter provides a robust way to connect to your RealtimeAgent, but it comes with challenges: - Browser Limitations: For teams building web-first applications, integrating with a telephony platform can feel redundant. - Complex Setup: Configuring Twilio accounts, verifying numbers, and setting up forwarding can be time-consuming. - Platform Dependency: This solution requires developers to rely on external API, which adds latency and costs.

The WebSocketAudioAdapter eliminates these challenges by allowing direct audio streaming over WebSockets. It integrates seamlessly with modern web technologies, enabling real-time voice interactions without external telephony platforms.

import RealtimeAgent from "/snippets/advanced-concepts/realtime-agent/websocket.mdx";