Examples

Complete programs from the examples directory of the repository. They are dedicated to the public domain under CC0: use them as the base of your own code.

The ones with dependencies declare them inline, so uv runs them with nothing to install.

Echo peer

Sends the received video back in grayscale.

Echo peer
Recorder

Writes received video and audio to raw files.

Recorder
Browser and Python server

Sends your camera back from Python in grayscale, with a chat over a data channel.

Browser and Python server
Voice chat with OpenAI GPT-Live

Talks to the model through your microphone and speakers.

Voice chat with OpenAI GPT-Live
Voice agent with Gemini Live

Talks to Gemini from a browser page, through a Python server that keeps the API key.

Voice agent with Gemini Live
Live stream in the terminal

Watches a public stream, with the video as colored characters and the audio on your speakers.

Live stream in the terminal
WHIP and WHEP

Plays a WHEP stream in the terminal, or publishes one over WHIP.

WHIP and WHEP