Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danibcorr/musicgenreclassifier
Music genre classifier for automatic equalization parameters for JamesDSP using CNN with Transformers.
https://github.com/danibcorr/musicgenreclassifier
classification cnn deep-learning dsp equalization jamesdsp music python spectrogram tensorflow transformer
Last synced: about 1 month ago
JSON representation
Music genre classifier for automatic equalization parameters for JamesDSP using CNN with Transformers.
- Host: GitHub
- URL: https://github.com/danibcorr/musicgenreclassifier
- Owner: danibcorr
- License: mit
- Created: 2024-05-17T08:52:56.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-30T09:13:19.000Z (6 months ago)
- Last Synced: 2024-07-01T22:34:32.442Z (6 months ago)
- Topics: classification, cnn, deep-learning, dsp, equalization, jamesdsp, music, python, spectrogram, tensorflow, transformer
- Language: Python
- Homepage:
- Size: 1.51 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# đĩ Music Genre Classifier and Equalizer
## đ Description
This project analyzes the audio being played on your computer, converts it into a MEL spectrogram, and uses a deep learning model to classify the music genre. Based on the detected genre, it sends a command to [JamesDSP](https://github.com/Audio4Linux/JDSP4Linux) to adjust the music equalization according to the genre-specific profile.
If you want to know more about the reason for certain selected parameters of the Mel programs, please visit the [following document](./documentation/explanations.md).
## 𧊠Features
- **Audio Capture**: Monitors and captures the audio being played on your computer.
- **MEL Spectrogram Conversion**: Converts the captured audio into a MEL spectrogram.
- **Music Genre Classification**: Utilizes a deep learning model to classify the genre of the audio.
- **Automatic Equalization Adjustment**: Sends commands to JamesDSP to adjust the equalization based on the detected music genre.## đ ī¸ Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/music-genre-classifier.git
cd music-genre-classifier
```2. Create a virtual environment (optional but recommended):
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```3. Install the required packages:
```bash
pip install -r requirements.txt
```## đšī¸ Usage
1. Start the main script to begin monitoring audio and adjusting equalization:
```bash
python main.py
```2. The system will capture the audio, generate the MEL spectrogram, classify the music genre, and adjust the equalization in real-time.
## đŧ Project Structure
- `data/`
- `balance_dataset.py`: Balances the dataset for training.
- `command_equalization.py`: Sends commands to JamesDSP for equalization adjustments.
- `data_acquisition.py`: Captures audio being played on the computer.
- `music_2_spectrogram.py`: Converts audio to MEL spectrogram.
- `model/`
- `schedulers/`: Contains learning rate schedulers.
- `architecture.py`: Defines the architecture of the deep learning model.
- `inference.py`: Handles inference for genre classification.
- `main.py`: Main script to run the complete audio analysis and equalization adjustment flow.
- `training.py`: Script for training the deep learning model.## đĢ Contributing
Contributions are welcome. If you would like to contribute, please follow these steps:
1. Fork the project.
2. Create a new branch (`git checkout -b feature/new_feature`).
3. Make your changes and commit them (`git commit -am 'Add new feature'`).
4. Push to the branch (`git push origin feature/new_feature`).
5. Open a Pull Request.## đ License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
---
Thank you for using our automatic music genre classification and equalization system!