Git Product home page Git Product logo

autotone's Introduction

Autotone

A vocal pitch correction web application (like Autotune): https://alexcrist.github.io/autotone/

This project works using CREPE's pitch detection model and Stephan Bernsee's approach to Fourier-transform based pitch shifting:

๐Ÿค– How it works

To perform vocal pitch correction, the input audio goes through two stages: pitch detection and pitch shifting.

To detect pitches, one of CREPE's pre-trained models is run using TensorFlowJS. To pitch shift, WebAssembly is used to run a C library that performs Fourier-based pitch shifting according to Stephan Bernsee's blog post above. Additionally, the audio processing algorithms are run in the background on web workers to prevent the browser from becoming unresponsive.

๐Ÿ’ป Development

Dependencies

  • Node v14.18.2
  • NPM v6.14.15
  • Emscripten v3.1.29

Developing

  1. Clone this repo
  2. Init the crepe submodule with git submodule init
  3. Build the C pitch-shifting library to WebAssembly by entering the tuner directory and running make
  4. Install the web dependencies by entering the react directory and running npm install
  5. Start the development server by entering the react directory and running npm start
  6. View the app at http://localhost:8080

Deploying

Deploy the app to GitHub Pages using scripts/deploy.sh

๐Ÿ“š Technologies used

  • TensorFlow.js
  • WebAssembly (Emscripten)
  • Web audio API
  • Web workers
  • React
  • Webpack

๐Ÿ”ญ Future work

  • Display a message if browser mic access is not granted
  • Display a warning if sample rate is not a multiple of 16000
  • Allow user to set pitch detection over-sampling factor
    • This will involve moving audio window/buffer building logic out of BufferNode/Processor and into Autotoner
  • Add export functionality
  • Add more types of scales
  • Allow user to pitch correct according to a separate target audio or MIDI input

autotone's People

Contributors

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