FastRTC is a Python library for building real-time audio and video communication applications over WebRTC and WebSockets.
The library solves the problem of integrating real-time communication into Python applications by abstracting away the complexity of WebRTC setup and stream management. It allows developers to convert any Python function into a bidirectional audio and video stream. The approach centers on automatic voice detection and turn-taking, so developers can focus on implementing response logic rather than managing low-level communication protocols. Built-in support for text-to-speech and voice activity detection handles common conversational patterns automatically.
FastRTC suits developers building conversational AI applications, voice-enabled interfaces, or interactive audio-video experiences in Python. The tool works well for projects that need quick prototyping with a built-in Gradio UI, or for production deployments where the stream can be mounted on a FastAPI application with a custom frontend. It supports multiple deployment patterns: launching a standalone web interface, mounting on an existing FastAPI server for WebRTC or WebSocket endpoints, or even exposing a temporary phone number for telephone access.
The project shows active development with regular commits addressing both core functionality and user-facing features. Work spans across multiple areas including infrastructure improvements, bug fixes in audio processing and WebRTC handling, and expansion of example applications. The codebase demonstrates attention to production concerns such as error handling and resource management alongside feature development.