This project leverages machine learning techniques to classify audio files into different music genres. It uses a neural network trained on extracted audio features such as MFCCs (Mel-Frequency Cepstral Coefficients).
- Classifies audio files into genres (e.g., rock, pop, classical, jazz).
- Open-source and available for contributions.
- Extracts audio features for analysis.
- Provides a web interface for easy interaction (coming soon).
The dataset used for training the model is the GTZAN dataset, which contains 1000 audio tracks categorized into 10 different genres. The dataset includes extracted audio features (MFCCs) from these audio files. Find out more about GTZAN here.
The model is built using TensorFlow/Keras. It consists of a simple neural network that processes the MFCC features and outputs the predicted genre.
To run this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/ikeawesom/genreAI.git
cd genreAI- Install the required dependencies:
pip install -r requirements.txt- Download the GTZAN dataset:
- Train the model:
python train.py- Modify the
MODELandFILE_PATHvariables withinapp.pyto use your preferred model on a sample audio file of your choice. The sample modelgenreAI_model.kerasand audio filetest.wavhas been provided within this repo.
MODEL = "genreAI_model.keras"
FILE_PATH = "test.wav"- Run
app.py.
python app.py
>> Genre is rock.Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch using
git checkout -b feature/your-feature. - Commit your changes using
git commit -m 'Add some feature'. - Push to the branch using
git push origin feature/your-feature. - Open a pull request.
This project is licensed under the MIT License - see the LICENSE for details.