Web app that performs tracklist recognition in DJ sets through the ACRCloud music recognition API. You give it a recorded DJ set, it gives you a list of tracks that the DJ played during the set.
- User provides a recorded DJ set either through a file upload or YouTube link.
-
Set gets uploaded to the server from client, or downloaded to the server from YouTube.
-
Multiple 12 second segments get extracted from the set in an interval specified by the
SEGMENT_INTERVAL
environment variable. -
Each segment gets sent to the ACRCloud API for identification.
-
Once a response is received for all segments, a second attempt is performed for segments that were not successfully identified in the first run. New segments are extracted for the second attempt at original time plus half of HEY_DJ_INTERVAL, i.e. approximately in the middle between the original two segments.
-
Results are pruned of duplicate results, stored in persistent cache for future identical requests, and sent back to the client.
-
Client renders a tracklist, displaying track name, artist and links to 3rd party services when available (Spotify, YouTube, Deezer and MusicBrainz).
The application is utilizes the following technologies:
- React for front-end
- Node.js for back-end runtime
- Express for back-end server
- MongoDB for persistent caching of results
- Mongoose for interaction between server and DB
- FFMPEG for audio file manipulation
- ACRCloud API for recognition of extracted audio segments
This prodcedure describes how to launch the application in a development or testing environment, with client and server on the same machine. In production environments the client and server would be deployed on different machines.
-
Clone the repository.
-
Run
npm install
in both server and client directories. -
Registered with ACRCloud.
-
Log in to ACRCloud Console and navigate to Project -> Audio & Video Recognition. Set up a project with the following settings:
- Audio Source: Recorded Audio
- Enable 3rd Party ID Integration: enabled
- Set up the following environment variables in your environment, or create a server/.env file and specify them in the file:
ACCESS_KEY
: ACRCloud project access keyACCESS_SECRET
: ACRCloud project secret keyHOST
: ACRCloud project host URLDB_URL
: URL of your MongoDB instance, including database name (e.g. mongodb://localhost:27017/hey-dj)PORT
: port number on which the server should runSEGMENT_INTERVAL
: interval between segments extracted from the set, specified in seconds (if unspecified, a default value of 120 is used)
-
Launch MongoDB.
-
Launch the server by running
node index.js
inside the server directory. -
Launch the client by running
npm start
inside the client directory. -
Enjoy!