AI product Open source
live-dj is an open-source voice-agent demo in which users talk to Mira, a late-night radio DJ, ask her to play music, and interrupt her while she speaks. It uses the Gemini Live API through the raw `google-genai` SDK rather than an agent framework.
The browser handles microphone capture, 16 kHz audio input, 24 kHz playback, client-side barge-in, and music ducking. The server maintains one asynchronous Live API session per browser and runs the core loop of opening a session, sending microphone audio, receiving streamed voice responses, and playing them. The full application adds Mira's persona, transcripts, music-tool dispatch, and controls for playing playlists or tracks, skipping, and pausing; the tools return immediately so the voice response does not stall. A minimal backend exposes the 39-line voice-only primitive, while the full server demonstrates the complete DJ application. The repository also documents a per-turn `session.receive()` behavior that requires an outer loop for continuing conversation, and shows that microphone audio must be sent through `send_realtime_input` rather than `send_client_content`.
It runs locally with `uv`, Uvicorn, and a Gemini Developer API key. The repository includes a browser client, four dream-pop tracks, persona assets, and examples of the relevant implementation pitfalls.
1 use taken from transcripts — each links to the moment in the video.
Source code for the live voice agent demonstrated in the episode.
1 in the library.