Skip to content

shib1111111/SereneSounds

Repository files navigation

SereneSounds

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.

Table of Contents

  1. Objectives
  2. Features
  3. Technology Stack
  4. Project Architectur
  5. Dataflow Diagram
  6. Project Structure
  7. Recommendation Systems
  8. Web App Screenshots
  9. Getting Started
  10. Usage
  11. Contributing
  12. License

Objectives

  • 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.

Features

  1. Lyric Similarity Recommendations: Discover songs with similar lyrics to your favorite tracks.
  2. Musical Feature Similarity Recommendations: Explore songs with similar musical features such as danceability and energy.
  3. Collaborative Filtering: Get recommendations based on collaborative filtering techniques.
  4. ALS Algorithm Recommendations: Recommendations using Alternating Least Squares (ALS) algorithm.
  5. Artist Similarity Recommendations: Discover songs based on artist collaborations using graph models.

Technology Stack

  • 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.

Project Architecture

The SereneSounds project follows a modular architecture with distinct components:

  • Data Handling: The music.py module loads the music dataset, while the poster_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.

Dataflow Diagram

data_flow

Project Structure

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

Recommendation Systems

Collaborative Filtering

  • 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.

Artist Similarity (Graph Model)

  • NetworkX graph represents artist collaborations.
  • Serialized graph used for efficient loading and recommendation computation.
  • Recommends songs by similar artists based on graph exploration.

Collaborative Filtering based on Musical Features

  • Musical features concatenated and TF-IDF vectorization computes similarity.
  • Recommendations based on the high-dimensional feature space of musical attributes.

Lyrics Similarity

  • 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 Algorithm for General Recommendations

  • ALS model trained on a user-item matrix.
  • Serialized model loaded to provide general music recommendations based on user preferences.

Web App Screenshots

Page
Page

Getting Started

Before you can run the SereneSounds app, ensure that you have the necessary prerequisites installed on your machine.

Prerequisites

Make sure you have the following installed:

  • Python 3.x: The programming language used to run the app.

Installation

Follow these steps to set up the SereneSounds app on your local machine:

  1. Clone the Repository:

    Open your terminal and run the following commands:

    git clone https://github.com/shib1111111/SereneSounds.git
    cd SereneSounds
    
  2. Install Dependencies:

Run the following command to install the required dependencies:

pip install -r requirements.txt

Usage

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/

Contributing

We welcome contributions to enhance SereneSounds. Feel free to open issues or submit pull requests.

License

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 ✨

About

SereneSounds is a sophisticated music curation web app that leverages various recommendation techniques to provide users with diverse and personalized music suggestions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published