Skip to content

Codebase for serverless application running basic-pitch as an async API plus session-based user auth

Notifications You must be signed in to change notification settings

eton1234/music-transcription-api

Repository files navigation

Setup and Purpose

The main purpose of this app is to run basic-pitch which converts a song into a midi file. https://basicpitch.spotify.com/

Each folder represents an AWS Lambda function. Need to create an API gateway, AWS RDS instance (with the same database schema as in the repo), and S3 bucket. Also need to create custom layers for functions which use specific libraries/packages (e.g. ffmpeg). Finally, need to create a docker image for the basic-pitch function and push it to ECR for deployment

Music Analysis Service

Asynchronous API to run Basic-pitch by Spotify.

image

User uploads a song either from source or through youtube. Song is downloaded to S3 bucket and an S3 trigger kicks off the basic-pitch async API. RDS is used to keep track of the status of basic-pitch jobs in the queue.

Auth Service

Auth service implemented from scratch (for learning) using session-based auth.

image The username and password is inputted by the client, the /post new_user function hashes the password, then commits the username,pwd_hash combination into the users table. Any service requiring authentication interacts with the /auth microservice and verifies the session token.

File Conversion (WAV to MP3)

image

For converting the WAV to MP3, we would have the client specify which WAV file they want to convert, it calls the wav_to_mp3 lambda function that does the actual conversion (using fffmpeg/pydub), and it posts the MP3 results in the S3 bucket. Now we have a compressed audio file!

About

Codebase for serverless application running basic-pitch as an async API plus session-based user auth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published