livekit/python-sdks

LiveKit real-time and server SDKs for Python

What it solves

This SDK provides the tools necessary to integrate real-time audio, video, and data communication into Python applications. It enables developers to build complex interactive experiences like multi-modal AI, live streaming, and video conferencing without having to build the underlying transport infrastructure from scratch.

How it works

The project consists of two primary packages:

  • livekit: A real-time SDK that allows a Python application to connect to a LiveKit server as a participant, publish and subscribe to media tracks (audio/video), and handle real-time events.
  • livekit-api: A server-side SDK used for administrative tasks such as generating access tokens for authentication and managing rooms via server APIs.

It supports asynchronous operations via asyncio and provides a high-level MediaDevices interface for accessing local microphones and speakers with built-in audio processing (e.g., echo cancellation).

Who it’s for

  • AI Developers: Those building multi-modal AI agents that need to interact with users via voice and video in real-time.
  • Application Developers: Developers creating live streaming or video call software using Python.
  • System Integrators: Those needing to manage LiveKit rooms and participants via API.

Highlights

  • Real-time Media: Support for publishing and subscribing to audio and video tracks.
  • RPC Support: Ability to perform remote procedure calls between participants, useful for forwarding LLM function calls to clients.
  • Hardware Acceleration: Automatic use of platform-specific hardware encoders/decoders (VideoToolbox on macOS, NVENC/NVDEC on NVIDIA GPUs, VAAPI on AMD GPUs).
  • Audio Processing: Integrated acoustic echo cancellation, noise suppression, and automatic gain control.

Related

  • Project
  • Project
  • Project
  • Project
  • Project