# Examples

Complete programs from the [examples](https://github.com/MarshalX/python-webrtc/tree/main/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](https://docs.astral.sh/uv/) runs them with nothing to
install.

[**Echo peer**](examples/echo.md)

Sends the received video back in grayscale.

[**Recorder**](examples/recorder.md)

Writes received video and audio to raw files.

[**Browser and Python server**](examples/browser_server.md)

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

[**Voice chat with OpenAI GPT-Live**](examples/openai_live.md)

Talks to the model through your microphone and speakers.

[**Voice agent with Gemini Live**](examples/gemini_live.md)

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

[**Live stream in the terminal**](examples/janus_streaming.md)

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

[**WHIP and WHEP**](examples/whip_whep.md)

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