SoundSphere PDF
SoundSphere PDF
SOUNDSPHERE - SONG
RECOMMENDATION SYSTEM
TEAM MEMBERS:
Anusha Narayani R
Nithyasri P
Sandhiya M
Sneha M
SOUNDSPHERE – A SONG RECOMMENDATION SYSTEM
Overview
The Python-based Music Recommendation System utilizes data analysis and machine learning
techniques, leveraging Spotify's API for data collection. It gathers track details, audio features, and
user interactions to build a recommendation model. This model employs content-based and
collaborative filtering methods for personalized suggestions based on user behavior and song
characteristics. Streamlit is used for creating an interactive web app interface, allowing users to
input their favorite songs and receive tailored recommendations. The system continuously refines
recommendations through user feedback, integrates with external APIs for extensive music data,
and ensures scalability and performance optimization for a seamless experience.
Source code
import pickle
import streamlit as st
import spotipy
CLIENT_ID = "70a9fb89662f4dac8d07321b259eaad7"
CLIENT_SECRET = "4d6710460d764fbbb8d8753dc094d131"
client_credentials_manager = SpotifyClientCredentials(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET)
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
track = results["tracks"]["items"][0]
song_url = track["external_urls"]["spotify"]
album_cover_url = track["album"]["images"][0]["url"]
else:
recommended_music_info = []
for i in distances[1:6]:
artist = music.iloc[i[0]].artist
song_name = music.iloc[i[0]].song
return recommended_music_info
st.header('Sound Sphere')
music = pickle.load(open('df.pkl','rb'))
similarity = pickle.load(open('similarity.pkl','rb'))
music_list = music['song'].values
selected_song = st.selectbox(
music_list
if st.button('Show Recommendation'):
recommended_music_info = recommend(selected_song)
num_cols = 4
for i in range(num_rows):
cols = st.columns(num_cols)
with col:
st.text(song_name)
st.image(album_cover_url)
st.write(f"[Listen on Spotify]({song_url})")
Output
The interface of the Music Recommendation System built with Streamlit library would typically
include several key components:
1. Input Section : This section allows users to input their preferences, such as their favorite songs,
artists, genres, or moods. Users can also upload playlists or select from a list of popular tracks.
3. Explore and Discover : Users can explore recommended content further, such as clicking on
recommended songs to listen to previews or full tracks, viewing artist profiles, exploring similar
genres or moods, and discovering new music based on their tastes.
4. Feedback and Ratings : The interface includes options for users to provide feedback, ratings,
likes, dislikes, and comments on recommended content. This feedback loop is crucial for improving
the recommendation model and enhancing future recommendations.
5. Settings and Customization : Users may have options to customize their recommendations
further, such as adjusting preferences, setting filters, saving favorite content, creating playlists, or
syncing with external music platforms like Spotify.
6. User Profile and History : For registered users, the interface may include a user profile section
displaying their listening history, saved preferences, previously liked or disliked content, and
recommendations tailored to their historical interactions.
7. Visualizations and Insights : Depending on the design, the interface may incorporate
visualizations and insights, such as charts or graphs showing music trends, popular genres,
user demographics, or the impact of user feedback on recommendations.
8. Help and Support : A help or support section provides resources, FAQs, and contact options for
users who need assistance or have questions about using the recommendation system.
Conclusion
In conclusion, the Music Recommendation System, with its intuitive interface powered by Streamlit
library, offers users a personalized and engaging music discovery experience. By leveraging data
analysis, machine learning techniques, and Spotify's API, it provides tailored recommendations
based on user preferences and behavior. The continuous feedback loop and integration with
external APIs ensure the system's accuracy, relevance, and scalability over time. Overall, the system
enhances music exploration, encourages user interaction, and promotes a seamless and enjoyable
journey in discovering new music.