Inspiration

A prerecorded DJ mix can become a shared game instead of a one-way performance. DJ Papzin wanted viewers to recognize tracks, play along and compete together without having to mix live.

What it does

Guess the Next Track gives a DJ three manually controlled rounds with three full track choices each. Viewers send !guess 1, !guess 2 or !guess 3 in Twitch chat. A paired companion page can update the same Twitch identity. Only the latest choice before locking counts; each correct guess earns one point. An OBS Browser source displays choices, countdowns, answer reveals and the final leaderboard.

The host controls rounds while OBS plays a prerecorded mix separately. Megamixes may layer vocals and instrumentals from multiple songs, so the DJ confirms recognizable entries rather than assuming exclusive track boundaries.

Created by DJ Papzin. Brought to you by Papzin & Crew.

How we built it with Codex

DJ Papzin used OpenAI Codex to develop the Python game and scoring engine, Twitch EventSub chat adapter, host dashboard, OBS overlay and clickable interface. Codex helped debug cross-input identity, duplicate messages, late guesses and scoring, and prepare simulation rehearsals. The demo includes actual Codex build-conversation excerpts and implementation/test evidence.

Twitch OAuth authorizes reading the broadcaster's chat. EventSub supplies real viewer messages, and a one-time chat pairing flow links a companion page to the actual Twitch chatter. Both inputs use the same viewer ID and game engine. Runtime answers and scoring are deterministic; no AI model identifies songs or decides answers.

Challenges and learning

Opening tracks need their own question before playback. In a megamix, several songs or stems can overlap, so a tracklist alone does not establish precise transitions. Switching between clicks and chat also needs one shared identity so changing an answer never creates an extra guess or point.

Testing and accomplishments

All 41 automated tests passed during preparation, covering round locking, scoring, duplicate delivery, stale events, shared click/chat identity and private answer projection. A real Twitch test selected choice 2 on the linked page, sent !guess 1 in chat, and verified one viewer guess and one point after reveal.

The video combines an illustrated opening, real app captures, one real Twitch participant and three labelled simulated viewers. The companion and build-conversation inserts use real still captures. No music is included in the demo.

How to run and test

Use the dev branch at commit 95b6ddcbfa6b3e1026cc3b64816f6c8b8e16faf1. Main remains the earlier chat baseline. Follow README.md for Python setup, launch and Twitch connection, then run python3 -m unittest discover -v.

Configure three host-confirmed rounds. Pair a companion page through Twitch chat, click choice 2, then send !guess 1. Verify the selected choice changes while the total stays one viewer. Lock the round, check late guesses are rejected, reveal the answer and repeat through the final leaderboard.

Judge repository: https://github.com/djpapzin/guess-the-next-track . Judge repository access is confirmed: devposttesting ([email protected]) accepted the collaborator invitation, and GitHub confirms repository access as of 30 October 2026.

Current limitations

The prototype runs locally. Remote viewers can guess through Twitch chat; the companion page currently requires access to the host computer's local app. Do not expose the local server publicly. In-memory state and OAuth sessions reset on restart; there is no automatic token refresh. Audio playback and game controls are manual, with no automatic song recognition or playback synchronization.

What's next

A hosted companion page with production authentication, persistent games and more flexible round scheduling would let remote viewers use clickable choices. These are future work, not completed features.

Built With

Share this project:

Updates

Submission history