This project is a simple karaoke app. It fetches lyrics using the Genius API and downloads karaoke tracks from YouTube using yt-dlp
.
It then displays the lyrics highlighted in sync with the music.
- Automatic fetching of lyrics using Genius API
- Karaoke track download from YouTube via
yt-dlp
- Time-synced lyrics based on song duration
- Real-time lyric highlighting (current line: bright green, others: yellow)
- Cross-platform compatibility (Windows/Linux/Mac)
This project demonstrates a basic level of AI integration through:
- Intelligent lyric parsing using NLP-like filtering to clean up non-singing parts like
[Chorus]
,[Verse]
, etc. - Synchronized timing logic, where lyric display is mapped proportionally across the total audio duration.
- Language: Python
- Genius API
- yt-dlp
- FFmpeg (
ffmpeg.exe
,ffplay.exe
,ffprobe.exe
) used byyt-dlp
to convert downloaded audio to.mp3
- mutagen (for getting MP3 duration)
- pygame (for audio playback)
- Standard Libraries:
os
,time
,threading
This repository uses Git Large File Storage (LFS) to include FFmpeg executables (ffmpeg.exe
, ffplay.exe
, and ffprobe.exe
) in the ffmpeg/bin
folder. These are required by yt-dlp
to convert downloaded YouTube audio into .mp3
format.
You must install Git LFS before cloning this repo to run the app locally.
-
Install Git LFS:
- On Windows: Download and run the Git LFS installer.
- Or, use the command line:
git lfs install
-
Clone this repo:
git clone https://github.com/schak04/ai-karaoke-app cd ai-karaoke-app
-
Install the required packages:
pip install -r requirements.txt
This app requires a Genius API key to fetch song lyrics.
-
Go to the Genius API Clients page and log in or sign up.
-
Create a new API client (you can name it anything).
-
Click on "Generate Access Token", then copy the access token.
-
In the project folder:
-
Rename the
.env.example
file to.env
-
In your
.env
file, replace 'paste_your_genius_api_key_here' with your actual Genius API key:GENIUS_ACCESS_TOKEN=paste_your_genius_api_key_here
-
-
You're now ready to run the app.
Note: Never share your
.env
file publicly. It's already ignored in.gitignore
for security reasons.
-
Open a terminal in the project folder.
-
Run the script using:
python karaoke_app.py
-
Enter the song name, and sit back as the system downloads lyrics and audio.
-
Sing along with the highlighted lyrics.
- Run
build.bat
to build thekaraoke_app.exe
file in thedist
folder. - Go to the
dist
folder and double-clickkaraoke_app.exe
. - Enter the song name, and sit back as the system downloads lyrics and audio.
- Sing along with the highlighted lyrics.
-
The base version of this app is purely CLI-based, with future plans for the addition of a proper GUI and more features.
-
An internet connection is required for fetching lyrics and karaoke audio.
-
If multiple songs have the same name, include the artist in your search.
Format:
<song> <artist>
instead of just<song>
. -
Avoid using special characters in song names.
-
Console must support ANSI escape codes, as it is essential for displaying coloured lyrics.
This project was meant to be a team project (team of 2) and is not open to public contributions.
Only contributions from my teammate, Amandeep Aman, will be accepted.
Copyright (c) 2025 Saptaparno Chakraborty.
All rights reserved.