From ffb0dca107a78e60ff5bbb574b5732c06fb1622b Mon Sep 17 00:00:00 2001 From: Chigozirim Igweamaka Date: Wed, 26 Jun 2024 04:56:45 +0100 Subject: [PATCH] Update README.md --- README.md | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d7daa7f..104c55d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,93 @@ -# song-recognition -My repliction of Shazam's song matching algorithm. +

NotShazam :musical_note:

+ +[NotShazam](https://notshazam.vercel.app/) is an implementation of Shazam's song recognition algorithm based on insights from these resources. It integrates Spotify and YouTube APIs to find and download songs from the internet. + +## Current Limitations +While the algorithm works excellently in matching a song with the exact song file, it performs poorly in finding the right match from a song recording. +However, this is still a work in progress. Hopefully, I can get it to work. I could use some help though. +Additionally, it only supports song files in WAV format. + +## Installation +### Prerequisites +- Golang: [Install Golang](https://golang.org/dl/) +- FFmpeg: [Install FFmpeg](https://ffmpeg.org/download.html) +- NPM: To run the client (frontend). + +### Steps +Clone the repository: +``` +git clone https://github.com/cgzirim/song-recognition.git +``` +Install dependencies +``` +cd song-recognition +go get ./... +``` + +## Usage +Install and Start the Client App +``` +cd client +npm install +npm start +``` +Download a Song +``` +go run main.go download +``` +Find matches for a song/recording +``` +go run main.go find +``` +Serve the Application +``` +go run main.go serve [-proto ] [-port ] +``` + +### Example +Download a song +``` +$ go run main.go download https://open.spotify.com/track/4pqwGuGu34g8KtfN8LDGZm?si=b3180b3d61084018 +Getting track info... +Now, downloading track... +Fingerprints saved in MongoDB successfully +'Voilà' by 'André Rieu' was downloaded +Total tracks downloaded: 1 +``` + +Find matches of a song +``` +$ go run main.go find songs/Voilà\ -\ André\ Rieu.wav +Top 20 matches: + - Voilà by André Rieu, score: 5390686.00 + - I Am a Child of God by One Voice Children's Choir, score: 2539.00 + - I Have A Dream by ABBA, score: 2428.00 + - SOS by ABBA, score: 2327.00 + - Sweet Dreams (Are Made of This) - Remastered by Eurythmics, score: 2213.00 + - The Winner Takes It All by ABBA, score: 2094.00 + - Sleigh Ride by One Voice Children's Choir, score: 2091.00 + - Believe by Cher, score: 2089.00 + - Knowing Me, Knowing You by ABBA, score: 1958.00 + - Gimme! Gimme! Gimme! (A Man After Midnight) by ABBA, score: 1941.00 + - Take A Chance On Me by ABBA, score: 1932.00 + - Don't Stop Me Now - Remastered 2011 by Queen, score: 1892.00 + - I Do, I Do, I Do, I Do, I Do by ABBA, score: 1853.00 + - Everywhere - 2017 Remaster by Fleetwood Mac, score: 1779.00 + - You Will Be Found by One Voice Children's Choir, score: 1664.00 + - J'Imagine by One Voice Children's Choir, score: 1658.00 + - When You Believe by One Voice Children's Choir, score: 1629.00 + - When Love Was Born by One Voice Children's Choir, score: 1484.00 + - Don't Stop Believin' (2022 Remaster) by Journey, score: 1465.00 + - Lay All Your Love On Me by ABBA, score: 1436.00 + +Search took: 856ms + +Final prediction: Voilà by André Rieu , score: 5390686.00 +``` +## Resources +- [How does Shazam work - Coding Geek](https://drive.google.com/file/d/1ahyCTXBAZiuni6RTzHzLoOwwfTRFaU-C/view) (main resource) +- [Song recognition using audio fingerprinting](https://hajim.rochester.edu/ece/sites/zduan/teaching/ece472/projects/2019/AudioFingerprinting.pdf) +- [How does Shazam work - Toptal](https://www.toptal.com/algorithms/shazam-it-music-processing-fingerprinting-and-recognition) +- [Creating Shazam in Java](https://www.royvanrijn.com/blog/2010/06/creating-shazam-in-java/) + +