Back to the CV

Radio Show

An autonomous radio DJ: an agent writes the script of a live show, voices it with text to speech and controls Spotify playback in each listener's own browser.

Running order of the Bebop Boogie show on air: the host opening script, the song Jordu by Duke Jordan with its progress bar, the on-air time and the pause and leave controls
Show on air: script, song and on-air time
Status
Self-hosted, in development

What it does

  • Plans the whole show as a running order, then writes each block live, one block ahead of what is playing.
  • Picks tracks on Spotify, rejecting karaoke versions and songs played too recently.
  • Voices each link with text to speech and lowers the music under the voice.
  • Remembers past shows: a short digest of recent plays, plus a history search the model calls when it needs it.

How it is built

  • Spotify delivers no audio through its API, so the backend produces and the browser directs: each listener plays the music with the Web Playback SDK and the voice is mixed locally with Web Audio.
  • The producer is a LangGraph graph with one thread per show, checkpointed in PostgreSQL, so a show survives an API restart. A rejected track is an edge back to the writing step.
  • FastAPI serves HTTP and a WebSocket. Voice clips wait in Redis and the next block is prepared while the current one plays.
  • Each listener uses their own OpenAI key, never shared, with a spending guard per show and tracing switched off.
  • A rewrite of a first version that polled Spotify every 200 ms. Message types are generated from the backend OpenAPI into TypeScript, so the two repositories share one contract.
Radio Show start page with four steps laid out as a running order: sign in with Spotify, add the OpenAI key, pick a program and go on air
Start: the four steps to go on air
New show screen with five stations: Blue Hour (jazz), Voltage (rock), Sol y Son (Latin music), Circuito (electronic) and Kaleidoscope, a mix of them all
The stations, each with its own programs

Technologies

  • FastAPI
  • LangGraph
  • PostgreSQL
  • Redis
  • React
  • TypeScript
  • Spotify Web Playback SDK
  • OpenAI API
  • Web Audio