An implementation of Shazam's song recognition algorithm.
Find a file
Chigozirim Igweamaka a5bbd1f8b4 Update README.md
2024-07-07 02:56:35 +01:00
.vscode Saving to github after many changes 2024-03-26 10:00:34 +01:00
client Implement animated number. 2024-06-30 21:09:18 +01:00
models Rename struct 2024-05-15 04:52:47 +01:00
scripts update script 2024-06-23 22:44:38 +01:00
shazam Find and return search duration. 2024-06-23 22:09:44 +01:00
spotify Delete .m4a song file once done using it. 2024-06-29 22:58:40 +01:00
utils Implement eraze command to delete song files and db collections 2024-06-30 15:00:45 +01:00
wav Exit with an error if any parameter is <= 0 2024-06-11 03:34:46 +01:00
.gitignore Ignore songs dir 2024-06-08 13:11:21 +01:00
appspec.yml Update appspec.yml 2024-05-21 08:31:04 +01:00
cmdHandlers.go Implement eraze command to delete song files and db collections 2024-06-30 15:00:45 +01:00
go.mod Update packages 2024-06-23 22:47:24 +01:00
go.sum Update packages 2024-06-23 22:47:24 +01:00
How_does_Shazam_work_Coding_Geek.pdf Upload pdf 2024-05-15 04:51:36 +01:00
LICENSE Initial commit 2024-03-05 16:20:41 +01:00
main.go Implement eraze command to delete song files and db collections 2024-06-30 15:00:45 +01:00
README.md Update README.md 2024-07-07 02:56:35 +01:00
socketHandlers.go correction 2024-06-30 15:01:42 +01:00

NotShazam 🎵

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

Current Limitations

While the algorithm works excellently in matching a song with its exact file, it performs poorly in identifying the right match from a recording. However, this project is still a work in progress. I'm hopeful about making it work, but I could definitely use some help.
Additionally, it currently only supports song files in WAV format.

Installation 🖥️

Prerequisites

Steps

Clone the repository:

git clone https://github.com/cgzirim/song-recognition.git

Install dependencies for the backend

cd song-recognition
go get ./...

Install dependencies for the client

cd song-recognition/client
npm install

Usage 🚴

Start the Client App

cd client
npm start

Serve the Backend App

go run main.go serve [-proto <http|https>] [-port <port number>]

Download a Song

go run main.go download <https://open.spotify.com/.../...>

Find matches for a song/recording

go run main.go find <path-to-wav-file>

Delete fingerprints and songs

go run main.go erase

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: 856.386557ms

Final prediction: Voilà by André Rieu , score: 5390686.00

Resources

Author ✒️

  • Chigozirim Igweamaka

License 🔒

This project is licensed under the MIT License - see the LICENSE file for details.