Skip to content

PeterM-13/AI-Song-Rater

Repository files navigation

SongChooser

SongChooser is a tool for automating the process of discovering, processing, and classifying music tracks from YouTube based on your personal preferences using AI.

Features

  • Download audio from YouTube: Fetches audio tracks from YouTube videos.
  • Convert to WAV: Converts downloaded audio files to .wav format for further processing.
  • Generate Spectrograms: Creates spectrogram images from .wav files, visualizing the audio for machine learning.
  • AI Model Training: Uses your ratings/preferences to train an AI model on the spectrograms.
  • Automatic Classification: Once trained, the model classifies new downloads into directories from 1 to 5 stars, so you can easily find tracks you'll enjoy.

Workflow

  1. Download: Use ytToMp3.py to download audio from YouTube as MP3 files.
  2. Convert: Use mp3ToWav.py to convert MP3s to WAV format.
  3. Spectrograms: Use wavToPng.py to generate spectrogram images from WAV files.
  4. Model Training: Use your ratings to train the AI model (see pngToModel.py or pngToCutomModel.py).
  5. Classification: The trained model sorts new tracks into 1_Star/ to 5_Stars/ directories for easy listening.

Directory Structure

  • ytToMp3.py: Download YouTube audio as MP3.
  • mp3ToWav.py: Convert MP3 files to WAV.
  • wavToPng.py: Generate spectrograms from WAV files.
  • pngToModel.py, pngToCutomModel.py: Train AI model on spectrograms.
  • wavToStars.py: Classify tracks into star directories.
  • 1_Star/ ... 5_Stars/: Classified tracks by rating.
  • 0_tmp_spectrograms/: Temporary spectrogram images.

Getting Started

  1. Install Python dependencies (see script headers for requirements).
  2. Run the scripts in the order above to process and classify your music.
  3. Enjoy your sorted music collection!

Notes

  • You will need to label tracks manually to train the model initially.
  • The AI model improves as you provide more ratings.

License

This project is for personal use and experimentation.

About

Custom AI model to rate songs between 1-5 stars, based on you/my taste.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages