SpotAI is a Flask-based web application that generates personalized Spotify playlists using machine learning algorithms. By leveraging Spotify's API and advanced clustering techniques, such as K-Means and Gaussian Mixture Models (GMM), SpotAI analyzes your listening data to create custom playlists tailored to your music preferences.
- Spotify Integration: SpotAI integrates with Spotify's API to access your top tracks, recently played songs, and saved tracks.
- Machine Learning Models: SpotAI uses K-Means and GMM clustering to group similar songs based on their audio features, such as danceability, energy, and tempo.
- Playlist Generation: Automatically creates Spotify playlists with recommended songs based on your listening habits and preferences.
- PCA for Dimensionality Reduction: Principal Component Analysis (PCA) is applied to optimize the clustering process by reducing the number of features.
- Caching for Improved Performance: SpotAI caches API responses and clustering results to enhance performance and minimize API requests.
- Logging: All application activity is logged to provide insights and error tracking.
- User Authentication: Log in to your Spotify account through the application using OAuth2 authentication.
- Data Collection: SpotAI retrieves your top tracks, recently played songs, and saved tracks from your Spotify library.
- Audio Feature Extraction: The app extracts various audio features (e.g., danceability, energy) for the collected songs.
- Clustering and Recommendation: Using K-Means and GMM clustering, SpotAI groups songs into clusters based on their features and generates song recommendations.
- Playlist Creation: SpotAI creates a new Spotify playlist, populated with the top recommended tracks for you.
- Flask: Python web framework to serve the app.
- Spotify API: Used to interact with your Spotify data.
- Spotipy: Python client for the Spotify Web API.
- Pandas: For data manipulation and analysis.
- Scikit-learn: Machine learning library for clustering algorithms (K-Means, GMM) and PCA.
- Caching: Implemented using Flask-Caching for performance optimization.
- Clone repo
- Add necessary keys to "info.txt"
- run app.py with python interpreter