Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
/ TuneType Public

TuneType is an advanced music genre classification system that leverages machine learning and audio signal processing to accurately identify the genre of any music track.

Notifications You must be signed in to change notification settings

ml3m/TuneType

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TuneType Logo

Advanced Music Genre Classification System

License: MIT Python 3.9+ Flask scikit-learn librosa

🎵 Overview

TuneType is an advanced music genre classification system that leverages machine learning and audio signal processing to accurately identify the genre of any music track. The system analyzes audio features such as spectral characteristics, rhythm patterns, harmonic content, and tonal features to classify songs into major music genres.

📊 Key Features

  • High-Accuracy Classification: Ensemble ML model combining multiple classifiers for robust genre detection
  • Support for Major Genres: Classifies music into 12 major genres including rock, pop, jazz, classical, hip-hop, and more
  • Comprehensive Audio Analysis: Extracts 135+ audio features for nuanced genre identification
  • Interactive Web Interface: User-friendly web app for uploading and analyzing music files
  • Detailed Visualizations: Genre probability distribution and audio feature visualizations
  • Cross-Platform Compatibility: Processes common audio formats (.mp3, .wav, .ogg)

🔧 Installation

Prerequisites

  • Python 3.9 or higher
  • pip (Python package manager)
  • Virtual environment (recommended)

Setup Instructions

  1. Clone the repository:
git clone https://github.com/yourusername/TuneType.git
cd TuneType
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Download genre samples for model training:
python download_samples.py
  1. Train the classification model:
python train_with_samples.py
  1. Start the web application:
python app.py
  1. Access the application in your browser at:
http://localhost:5001

📝 Usage

  1. Upload a Music File: Click the upload button and select an audio file (.mp3, .wav, .ogg)
  2. Analyze: Click the "Analyze" button to process the audio and detect the genre
  3. View Results: The system will display:
    • Top predicted genre
    • Confidence scores for all genres
    • Detailed audio feature visualizations
  4. Explore Features: Navigate to the visualization page for deeper analysis of audio characteristics

🧠 How It Works

TuneType operates through a multi-stage pipeline:

  1. Feature Extraction: Converts raw audio into 135+ numerical features including:

    • Mel-frequency cepstral coefficients (MFCCs)
    • Spectral characteristics (centroid, rolloff, contrast)
    • Rhythm features (beat statistics, tempo)
    • Harmonic/percussive component analysis
    • Tonal features (chroma, key detection)
  2. Classification: Uses an ensemble model combining:

    • Random Forest Classifier
    • Gradient Boosting Classifier
    • Extra Trees Classifier
    • Support Vector Machines
    • Neural Networks
    • K-Nearest Neighbors
  3. Result Presentation: Displays genre predictions with confidence scores and interactive visualizations

🛠️ Technical Architecture

  • Backend: Flask (Python web framework)
  • Machine Learning: scikit-learn, librosa, numpy
  • Frontend: HTML5, CSS3, JavaScript, Chart.js
  • Audio Processing: librosa, soundfile

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

About

TuneType is an advanced music genre classification system that leverages machine learning and audio signal processing to accurately identify the genre of any music track.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published