Inspiration
Church volunteers running Sunday livestreams face a recurring panic: their YouTube livestream suddenly goes dead silent or gets slapped with an algorithmic copyright strike.
Here’s the heartbreak: almost every church already pays hundreds of dollars annually for valid music copyright licenses (like CCLI Streaming and Christian Copyright Solutions). Yet, automated Content ID bots don’t care about paper licenses—they match live acoustic worship against studio master recordings and aggressively mute the telecast mid-service.
Traditional AI solutions try to act like creative directors: "You can't sing Way Maker, sing this public domain hymn instead." But worship liturgy doesn’t work that way. The pastor picks the songs. No AI should ever dictate church worship.
I built Selah to be an autonomous, invisible telecast copilot. It doesn’t replace worship—it protects the broadcast. It accepts any setlist (even messy handwritten bulletin photos), investigates primary copyright databases via Parallel Web Search, assesses true Content ID streaming risk via Gemini 3.7 Flash, drives three zero-latency live screens simultaneously in the media booth, and generates complete post-broadcast dispute defense packs in seconds.
What it does
Selah automates the complete Sunday telecast lifecycle across a cinematic 3-Act Architecture:
Act 1: Intake & Autonomous Rights Guard
- Tri-Modal Setlist Intake: Ingests photos of handwritten song lists, Planning Center Services exports, or plain text messages from worship pastors.
- Compound Medley Decomposition: Worship leaders frequently write compound medleys like "Way Maker / Great Are You Lord" or "10,000 Reasons -> Goodness of God". Selah's Gemini parser automatically decomposes medleys into atomic tracks, tracking musical transitions while evaluating legal rights independently.
- Autonomous Musicology Research: Orchestrates autonomous research agents combining the Google Agent Development Kit (ADK) with Parallel Search to verify true copyright owners, original publication dates (1930 or earlier for US Public Domain verification under 17 U.S.C. 103), and exact CCLI SongSelect ID numbers.
- Progressive Rights Verdicts: Songs are flagged Green (Covered), Yellow (Public Domain), or Red (Action Required).
- Human-in-the-Loop Safe Mode Gate: Red-verdict songs block the telecast "Go Live" trigger until a volunteer chooses an operational action (e.g., Safe Mode stream audio mute during that song, Verify arrangement, or Acquire sync license).
- Diaspora Latin Transliteration: Automatically generates phonetic Latin script transliterations for non-English diaspora hymns (Tamil, Malayalam, Hindi, Telugu, Spanish) so multi-generational congregations can sing along seamlessly.
Act 2: Live Telecast Operator Console & Displays
- Dual Local & Network Display Synchronization: Uses the browser-native
BroadcastChannelAPI for instantaneous 0ms screen synchronization between the master operator console and secondary hardware displays on the booth PC, paired with an SSE server stream fallback allowing secondary PCs (such as an OBS streaming rig or musician stage iPad on the church LAN) to receive live slide transitions in real time. - Sanctuary Projector Display (
/output): High-contrast, typography-first widescreen display for in-room congregation singing. - Transparent OBS / vMix Lower-Third (
/output?mode=lower-third): Studio-grade broadcast overlay with true alpha transparency, subtle animations, gold accents, and transliterated diaspora sublines. - Musician Stage Confidence HUD (
/stage): High-visibility stage monitor displaying active section tags ([Chorus],[Verse 2]), a live digital clock, and an amber "Next Up" lyrics preview so musicians never miss a cue. - Hardware Foot Pedal & Web MIDI Controller: Hot-pluggable support for USB foot pedals, wireless presenter clickers, and MIDI sustain pedals (
CC #64) for hands-free slide advancing while mixing audio. - Dual Presentation Exporter: 1-click download of production-ready 16:9 Widescreen PowerPoint (
.pptx) decks (built dynamically withpython-pptx) and ProPresenter 7 (.json) presentation bundles.
Act 3: Post-Broadcast Closeout & Dispute Defense
- YouTube Metadata & Timestamps: Generates the exact video description with legally compliant CCLI attributions and 0:00-indexed chapter markers for every song performed.
- Quarterly CCLI Audit Reporting Table: Automatically compiles a clean Markdown audit log ready for church administrative quarterly reporting.
- Content ID & Meta Dispute Kit: Pre-drafts legally grounded dispute statements for YouTube Content ID and Meta Rights Manager appeals, citing specific public domain statutes (17 U.S.C. 103) and verified CCLI SongSelect license numbers.
- 1-Click Markdown Dossier: Exports the entire compliance package as an archival
.mdcompliance dossier.
How I built it
Selah is built on a zero-mock production stack:
- AI Core: Powered exclusively by Google's latest Gemini 3.7 Flash (
gemini-3.7-flash) via thegoogle-genai(v2.18.1) andgoogle-adk(v2.7.1) SDKs. I implemented a multi-key pool rotator that transparently catches 429 quota exhaustion events and rotates API keys, automatically complying with the API'sretryDelayheaders. - Grounding Engine: Integrated the Parallel Search SDK (
parallel-web1.3.0) with an objective-driven search query generator. Parallel queries CCLI SongSelect, Hymnary.org, Capitol CMG Publishing, and Music Services, trimming citations to crisp, verifiable evidence URLs. - Backend Architecture: Built with FastAPI and Python 3.12, featuring Server-Sent Events (
/api/plan/{id}/stream) for real-time live telemetry push to the frontend with robust polling fallback, dynamic 16:9 presentation generation viapython-pptx, and Pydantic v2 data models with before-validators for strict schema integrity. - Frontend Architecture: Built with React 19 and Vite 8. Designed with zero CSS frameworks—using crafted Vanilla CSS variables, high-contrast dark mode palettes, and glassmorphic broadcast overlays. Screen synchronization uses a dual-engine architecture (
BroadcastChannelIPC + SSE stream fallback). - Deployment: Packaged in a multi-stage Docker container (Node 20 build stage -> Python 3.12 slim runtime) deployed serverlessly on Google Cloud Run with $0.00 idle cost (
min-instances=0).
Challenges I ran into
- The Public Domain Derivative Work Trap (1930 or Earlier): A common misconception in music copyright is that an old hymn is always Public Domain. Pre-1931 hymn texts (published in 1930 or earlier) set to modern chord progressions or modern refrains (like Chris Tomlin's My Chains Are Gone, CCLI #4768151) create a new copyrighted derivative work under 17 U.S.C. 103. I prompt-engineered and grounded Gemini 3.7 with Parallel Search to cross-reference original publication years and detect whether the performed arrangement introduces new copyright claims.
- Sub-Millisecond Multi-Display Sync in Church Media Booths: Church broadcast booths run multiple physical monitors off one PC (projector output, OBS virtual camera feed, stage confidence monitor). Relying purely on remote servers introduced intolerable 500ms–1500ms lag. I solved this by using the browser's native
BroadcastChannelAPI for 0ms local IPC on the booth PC, paired with a Server-Sent Events fallback so secondary PCs across the church LAN stay in sync. - Compound Medleys: Worship leaders habitually write medleys as single setlist lines (
"Way Maker / Great Are You Lord"). A naive search fails to find copyright records for a non-existent combined title. I engineered a compound decomposition pass insetlist_agent.pythat splits compound strings, flags child entries, and analyzes each song's publishing rights independently. - LLM Schema Coercion & Zero-Repair Resilience: During autonomous research, LLMs frequently emit CCLI numbers as raw integers (
7115744) rather than strings, or omit optional YouTube risk summaries. By implementing custom Pydantic v2 before-validators and defensive JSON sanitizers, I eliminated redundant repair passes, reducing latency and saving an entire Gemini call per song.
Accomplishments that I'm proud of
- 100% Google AI & Parallel Stack: Zero OpenAI, zero Anthropic, and zero mock data. Every single verdict is grounded in real-time primary sources via Parallel Search and synthesized by Gemini 3.7 Flash.
- Hard Product Boundary Respected: Unlike other AI assistants, Selah never attempts to substitute or alter the pastor's worship setlist. It protects liturgical intent while giving tech operators clear operational remedies.
- True Dual Broadcast Sync: Running the Sanctuary Projector, OBS Transparent Lower-Third, and Musician Stage HUD with 0ms in-memory latency locally, with seamless live streaming to separate PCs over the local network.
- Hardware Integration: Real Web MIDI sustain pedal (
CC #64) and USB foot pedal control for hands-free telecast mixing. - Real Production Deck Export: Generating authentic 16:9 widescreen PowerPoint
.pptxdecks and ProPresenter 7 bundles with verse-chorus chunking and CCLI footers in one click.
What I learned
- Grounding is non-negotiable for legal compliance: In legal copyright research, LLM hallucinations can lead to thousands of dollars in statutory fines or muted streams. Authoritative web search grounding via Parallel Search turned Gemini from a probabilistic guesser into a verifiable musicology researcher.
- Dual IPC + SSE Architecture: Local
BroadcastChanneldelivers instant 0ms in-memory synchronization across physical monitors on the booth PC, while the SSE server stream fallback ensures OBS rigs and stage monitors on separate PCs across the local network stay synchronized without heavy WebSocket infrastructure.
What's next for Selah
- Gemini Multimodal Live Audio Sentinel: On-premise sanctuary microphone monitoring via Google's Gemini Multimodal Live API to detect when the congregation starts singing and automatically cue lower-third slide transitions.
- Planning Center Services 2-Way Sync: Direct OAuth integration to automatically fetch Sunday setlists directly from PCO and write back CCLI usage logs into church administrative records.
- Automated YouTube Content ID API Appeal Submissions: Direct Google YouTube Partner API integration to submit dispute packages directly to YouTube's dispute portal with one click from the booth.
Log in or sign up for Devpost to join the conversation.