Git Product home page Git Product logo

complet-api's Introduction

Complet logo, generated with AI

Instantly generate stems from YouTube videos with complet ๐ŸŽธ

Complet is a music service that allows extracting the stems (vocals, drums, bass, other) from a YouTube video using deep learning powered by the spleeter model from Deezer. This makes it easy to recreate a full band sound even when some instruments are missing, by using the stems as backing tracks.

This repository contains the API component of the complet service.

Features

  • Extract stems from YouTube video via link
  • Return download links for each stem
  • Store extracted stems on AWS S3
  • Built with Python FastAPI framework
  • Fully automated infrastructure as code (IaC) with Terraform
  • CI/CD pipelines with GitHub Actions

Usage

To extract stems from a YouTube video:

POST /stems/extract
{
  "youtube_link": "https://youtu.be/..."  
}

RESPONSE:
{
  "stems": {
    "vocals": "https://s3.amazonaws.com/...",
    "drums": "https://s3.amazonaws.com/...", 
    "bass": "https://s3.amazonaws.com/...",
    "other": "https://s3.amazonaws.com/..."
  }
}

Architecture

The complet API uses FastAPI to handle requests and run the spleeter model. The infrastructure is provisioned on AWS using Terraform modules. CI/CD pipelines deploy changes from GitHub dev/staging/prod branches.

Complet API AWS architecture diagram

The complet API infrastructure is provisioned on AWS using Terraform. User requests first reach the API Gateway, which handles API versioning - by default requests go to the /v1 stage endpoints.

API Gateway triggers a Lambda function containing the FastAPI application code running in a Docker container stored in ECR. This serverless function handles the API logic and stem extraction using the spleeter model.

Extracted audio stems are uploaded to an S3 bucket for persistent storage. Download URLs for the stems are returned in the API response. The logs from the Lambda function are stored in CloudWatch Logs.

Terraform state is stored remotely in S3, with separate state buckets for each environment (dev, staging, prod). This allows independent infrastructure for each stage following Git branching workflow.

Storing Terraform state remotely enables a consistent view of infrastructure and prevents state duplication. Infrastructure changes can be applied predictably through CI/CD pipelines using the same configured backend.

License

This project is licensed under the MIT license. See LICENSE for details.

Resources

complet-api's People

Contributors

damarals avatar

Stargazers

Natanael avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.