AI Audio & Terminal UI 2026

LYRICS — Real-Time Word-by-Word Terminal Karaoke Engine

A blazing-fast terminal karaoke engine in Python with AI vocal alignment via Whisper VAD, multilingual lyrics parsing, and live highlighted playback.

Python Pygame Faster-Whisper AI Voice Alignment Terminal ANSI Multilingual NLP
Live 3D Experience

Project Architecture & Overview

View on GitHub →

🎵 BroCodes Lyrical Engine

Real-Time Word-by-Word Karaoke — Right Inside Your Terminal

Python Pygame Whisper Platform License Made by BroCodes


No popups. No exports. No setup headaches. Drop your song. Paste your lyrics. Press play. Watch every word light up in yellow — perfectly in sync.



✨ What Is This?

BroCodes Lyrical Engine is a blazing-fast, pure-terminal karaoke system that:

  • Listens to your .mp3 or .mp4 file
  • Reads your pasted lyrics (any language — Marathi, Hindi, Punjabi, English)
  • AI-aligns lyrics to vocal timing using Whisper VAD
  • Highlights each word in bright yellow as the singer sings it — live, in your terminal

Zero video rendering. Zero GUI popups. Pure terminal magic.


🚀 Quick Start — 3 Steps

# Step 1: Drop your audio/video into media/
#         Supports: .mp3  .mp4  .wav  .m4a  .aac  .ogg  .flac  .mkv  .mov

# Step 2: Paste your lyrics into media/lyrics.txt
#         Any language: Marathi, Hindi, Punjabi, English — all supported

# Step 3: Launch!
python make_lyrics.py

# — or double-click —
run.bat

That's it. The engine does the rest.


🎤 Terminal Karaoke — Live Preview

══════════════════════════════════════════════════════════════════════════
  🎵 Video 34938  ⚡ BroCodes        ▶ PLAYING   [00:17.1 / 00:29.0]
  Progress: [████████████░░░░░░░░]  59%
──────────────────────────────────────────────────────────────────────────

  🎤 NOW SINGING:  ▶ [ TUJHE ] ◀

  main  te  bas  kanhada  rahanda  aap  [ TUJHE ]  dekha  to  ye  jaana

──────────────────────────────────────────────────────────────────────────
  [Space] Play/Pause  [R] Restart  [←/→] Seek ±5s  [+/-] Sync  [Q] Quit
══════════════════════════════════════════════════════════════════════════

The current word glows yellow while past words stay white and upcoming words are dimmed gray.


📁 Folder Structure

LYRICS/
├── 📄 make_lyrics.py          ← Main entry point
├── 📄 terminal_player.py      ← Real-time karaoke renderer
├── 📄 lyrics_manager.py       ← Lyrics parser + AI sync engine
├── 📄 lyrics_transliterate.py ← Marathi/Hindi/Punjabi romanizer
├── 📄 transcriber.py          ← Whisper VAD vocal alignment
├── 📄 audio_analyzer.py       ← Audio fingerprinting utilities
├── 🗂️ media/
│   ├── lyrics.txt             ← ✏️  PASTE YOUR LYRICS HERE
│   └── YourSong.mp3           ← 🎵  DROP YOUR SONG HERE
├── 🗂️ assets/fonts/           ← Multilingual font assets
│   ├── Mukta-Bold.ttf
│   ├── NotoSansDevanagari-Bold.ttf
│   ├── Poppins-Bold.ttf
│   └── Poppins-Medium.ttf
└── 🗂️ output/                 ← Clean — no video exports

📝 How to Paste Lyrics

Open media/lyrics.txt and paste your lyrics in any of these formats:

Format 1 — Dual Line (Original + English) [RECOMMENDED]

# [LYRICS_1]
कहो ना प्यार है
kaho na pyaar hai
तुझे देखा तो ये जाना सनम
tujhe dekha to ye jaana sanam

# [LYRICS_2]
Tell me this is love
A dream I've been dreaming of

Format 2 — Single Language

अखियाँ दे सामणे तू बैठा रहे देर तक
बाग़ाँ विचों माँ ते लोंडे तेरे ली गुलाब वे

The engine will auto-detect Marathi / Hindi / Punjabi / English and romanize for glitch-free display.


⌨️ Keyboard Controls

Key Action
Space ▶ / ⏸ Play or Pause
R 🔄 Restart from the beginning
← ⏪ Seek backward 5 seconds
→ ⏩ Seek forward 5 seconds
+ ⏫ Nudge lyrics sync forward (+0.5s)
- ⏬ Nudge lyrics sync backward (−0.5s)
Q ❌ Quit player

🧠 How AI Sync Works

Your Song (.mp3/.mp4)
       │
       ▼
  [Whisper VAD]  ←── Detects vocal segments with timestamps
       │
       ▼
  [LyricsManager]  ←── Maps your pasted lines to vocal segments
       │
       ▼
  [Word Splitter]  ←── Distributes word-by-word timestamps
       │
       ▼
  [TerminalPlayer]  ←── Renders real-time yellow karaoke highlight
  • Uses voice activity detection (VAD) — finds exactly when vocals start/end
  • No manual timestamp editing needed — fully automatic
  • Use + / - keys to fine-tune sync drift in real time

🌐 Supported Languages

Language Input Script Display
English Latin ✅ Native
Hindi Devanagari ✅ Auto-Romanized
Marathi Devanagari ✅ Auto-Romanized
Punjabi Shahmukhi / Gurmukhi ✅ Auto-Romanized
Any Roman Script Latin ✅ Native

Romanization ensures zero font glitches in any terminal or OS.


📦 Requirements

pip install pygame faster-whisper indic-transliteration
# ffmpeg must be available in PATH (for .mp4 audio extraction)
Package Purpose
pygame Audio playback engine
faster-whisper AI vocal alignment
indic-transliteration Devanagari → Roman converter
ffmpeg Video-to-audio extraction

💡 Tips & Tricks

  • Multiple songs? Just drop multiple files in media/. The engine picks the first one, or use --file flag.
  • Re-align after editing lyrics? Run: python make_lyrics.py --realign
  • Pick a specific file: python make_lyrics.py --file media/MySong.mp3
  • Sync still off? Use + / - live during playback to nudge timing.

🏆 About BroCodes

BroCodes builds next-generation developer tools, web products, and creative automation systems.

🌐 brocodes.space  |  📧 brocodesorg@gmail.com  |  🐙 github.com/brocodesorg


© 2024 BroCodes. All Rights Reserved. Created, designed, and engineered by BroCodes. Unauthorized reproduction or redistribution is strictly prohibited.