Skip to content

Download music from SoundCloud/YouTube and identify songs using Shazam πŸ”

License

Notifications You must be signed in to change notification settings

in0vik/Shazam-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 Shazam Tool

πŸ” A Python script that downloads audio from SoundCloud or YouTube, splits it into segments, and uses Shazam to identify songs within the mix.

✨ Features

  • 🎧 Download audio from SoundCloud or YouTube URLs
  • 🎼 Identify songs using Shazam API
  • πŸ’Ύ Save results to timestamped text files

πŸ› οΈ Requirements

This project uses scdl for downloading SoundCloud tracks.

Linux

sudo apt install ffmpeg scdl
pip install ShazamApi pydub pytube shazamio

macOS

# Install Homebrew if not already installed
# See https://brew.sh for installation instructions

brew install ffmpeg scdl

# Optional: Create and activate virtual environment
# python3.11 -m venv venv && source venv/bin/activate

# If you don't have Python 3.11:
# brew install [email protected]

# Install required packages
pip install shazamio pydub pytube ShazamApi

πŸ“š Usage

The script supports three main commands:

1. Download and Process from URL

python shazam.py download <url>

Downloads audio from YouTube or SoundCloud and processes it for song recognition.

2. Scan Downloaded Files

python shazam.py scan

Processes all MP3 files in the Downloads directory.

3. Recognize Single File

python shazam.py recognize <file>

Processes a single audio file for song recognition.

πŸ“‹ Output

Results are saved in the recognised-lists directory with timestamped filenames in the format:

songs-DDMMYY-HHMMSS.txt

ℹ️ The generated song list can be imported into TuneMyMusic

πŸ“ Notes

  • The script splits audio into 1-minute segments for optimal recognition
  • Duplicate songs within the same mix are automatically filtered out
  • Large files are processed in chunks to manage memory efficiently

🀝 Contributing

Feel free to open issues or submit pull requests with improvements. We welcome contributions from the community!


Built with ❀️

About

Download music from SoundCloud/YouTube and identify songs using Shazam πŸ”

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages