SereneSounds is a sophisticated music curation web app that leverages various recommendation techniques to provide users with diverse and personalized music suggestions. The project is built using Python and Streamlit, with backend recommendation models implemented through collaborative filtering, Alternating Least Squares (ALS) algorithm, lyric and musical feature similarity, and artist similarity using graph models.
- Objectives
- Features
- Technology Stack
- Project Architectur
- Dataflow Diagram
- Project Structure
- Recommendation Systems
- Web App Screenshots
- Getting Started
- Usage
- Contributing
- License
-
Personalized Music Recommendations: SereneSounds aims to offer users a personalized music listening experience by recommending songs based on their preferences, exploring both content-based and collaborative filtering approaches.
-
Diverse Recommendation Techniques: The project employs a combination of recommendation techniques, including collaborative filtering, ALS algorithm, lyric similarity, musical feature similarity, and artist similarity, ensuring a diverse set of music recommendations.
-
User Interaction: The web app provides a user-friendly interface where users can select a song and receive recommendations based on different algorithms and similarity metrics.
- Lyric Similarity Recommendations: Discover songs with similar lyrics to your favorite tracks.
- Musical Feature Similarity Recommendations: Explore songs with similar musical features such as danceability and energy.
- Collaborative Filtering: Get recommendations based on collaborative filtering techniques.
- ALS Algorithm Recommendations: Recommendations using Alternating Least Squares (ALS) algorithm.
- Artist Similarity Recommendations: Discover songs based on artist collaborations using graph models.
-
Streamlit: A Python library for creating interactive web applications. Streamlit simplifies the process of turning data scripts into shareable web apps.
-
Python: The core programming language used for implementing recommendation algorithms, data processing, and web app functionality.
-
Pandas: A powerful data manipulation and analysis library in Python, used for handling and processing the music dataset.
-
NetworkX: A Python package for the creation, manipulation, and study of complex networks. Used for constructing and analyzing the artist collaboration graph.
-
Spotipy: A Python library for interacting with the Spotify Web API, used for obtaining album cover URLs for songs.
-
ALS Algorithm: Alternating Least Squares is a matrix factorization technique used for collaborative filtering recommendations. The ALS model is trained on a user-item matrix to capture latent factors.
-
TF-IDF Vectorization: Used for lyric-based and musical feature-based recommendations. It converts text data into numerical vectors to measure the importance of words in a song.
The SereneSounds project follows a modular architecture with distinct components:
-
Data Handling: The
music.py
module loads the music dataset, while theposter_maker.py
module uses the Spotify API to fetch album cover URLs. -
Recommendation Models: Modules in the
recommenders
package implement different recommendation techniques, including ALS-based collaborative filtering, artist similarity using graph models, and lyric and musical feature similarity. -
Web App: The
app.py
file uses Streamlit to create a user interface for song selection and displays recommendations based on the chosen algorithms. -
User Signature: The
signature.py
module adds a signature section to the web app to acknowledge the developer.
SereneSounds
├── app.py
├── content_renderer.py
├── data
│ ├── als_model.pkl
│ ├── graph_data.pkl
│ ├── lyrics_similarity.pkl
│ ├── musical_feature_similarity.pkl
│ ├── songs.csv
│ └── song_data.pkl
├── music.py
├── path.py
├── poster_maker.py
├── Recommendation_System.ipynb
├── recommenders
│ ├── als_recommenders.py
│ ├── artists_similarity_recommenders.py
│ ├── collaborative_recommenders.py
│ ├── lyrics_similarity_recommenders.py
│ └── musical_similarity_recommenders.py
└── signature.py
- User-item matrix created using CSR matrix representation.
- ALS model trained and serialized for efficient recommendation generation.
- Factor matrices extracted, and recommendations provided based on the dot product.
- NetworkX graph represents artist collaborations.
- Serialized graph used for efficient loading and recommendation computation.
- Recommends songs by similar artists based on graph exploration.
- Musical features concatenated and TF-IDF vectorization computes similarity.
- Recommendations based on the high-dimensional feature space of musical attributes.
- Text data preprocessed for better understanding of song lyrics.
- TF-IDF vectorization calculates cosine similarity among songs.
- Songs with similar lyrics recommended to users.
- ALS model trained on a user-item matrix.
- Serialized model loaded to provide general music recommendations based on user preferences.
Before you can run the SereneSounds app, ensure that you have the necessary prerequisites installed on your machine.
Make sure you have the following installed:
- Python 3.x: The programming language used to run the app.
Follow these steps to set up the SereneSounds app on your local machine:
-
Clone the Repository:
Open your terminal and run the following commands:
git clone https://github.com/shib1111111/SereneSounds.git cd SereneSounds
-
Install Dependencies:
Run the following command to install the required dependencies:
pip install -r requirements.txt
To run the SereneSounds app, execute the following command in your terminal:
streamlit run app.py
Visit the provided local URL (usually http://localhost:8501) in your web browser to access the app.
or directly go to deployed server url : https://serenesounds.streamlit.app/
We welcome contributions to enhance SereneSounds. Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.
Thank you for using SereneSounds! Feel free to reach out with any questions or feedback.
✨ --- Designed & made with Love by Shib Kumar Saraf ✨