-
Notifications
You must be signed in to change notification settings - Fork 0
APIs and Controller
Flask API endpoint to call our machine learning model. Requires the URI of a sound clip posted to a databse. Returns the song label.
Endpoint: GET /identifysong/
Request Parameters (JSON):
Key | Type | Value |
---|---|---|
URI | String | The URI of the sound byte on an external database |
Returns (JSON): Artists and Title of input audio clip
Key | Type | Value |
---|---|---|
URI | String | The URI of the sound byte on an external database |
Song_Name | String | The name of the song sent to the ML model. |
Response Codes:
Response Code | Interpretation |
---|---|
200 OK |
Successfully identified the song; name and requested uri supplied in return JSON. |
400 Bad Request |
Invalid request format. |
404 Not Found |
Could not identify the song or locate the URI in AWS. |
Calls AWS backend search engine to retrieve relevant movie/song information Returns relevant information about movies containing a given song.
Endpoint: GET /songinfo/
Request Parameters (JSON):
Key | Type | Value |
---|---|---|
Song_Name | String | The name of the song on which movie data is desired. |
Returns (JSON):
Key | Type | Value |
---|---|---|
Song_Name | String | The name of the song on which movie data is desired. |
MovieData | String Objects | An array of movies in which the song has been used and each movie's data. |
Here's a breakdown of the objects contained in MovieData:
Key | Type | Value |
---|---|---|
Movie_Name | String | The name of the movie. |
Director | String | The director of the movie |
Year | Integer | The year the movie was released. |
Timestamp | String | The time the song is played in the movie (HH:MM) |
Response Codes:
Response Code | Interpretation |
---|---|
200 OK |
Successfully located related movies and associated data. Returns json results as above. |
400 Bad Request |
Invalid request format. |
404 Not Found |
Unrecognized song. |
After recording the song clip, the frontend will POST the song to an AWS S3 bucket which the ML model can query for the clip. Include AWS access key, file, and key (which AWS uses to name the resource) in POST parameters.
After recording the song clip, the frontend will access the ShazamKit SDK using a "Matcher" class to identify the song clip.
Ability to open up song/movie [info] in other applications (e.g. spotify, youtube, google). Query apps with the ability to play songs via Intents. Allow user to select one of the responding apps on the current phone.