Giter Club home page Giter Club logo

waffl's Introduction

WAFFL

Waveform Audio Fundamental Frequency Learner Authors: Sean Goldie, Gregor McWilliam, Jack Tipper

A novel and efficient machine learning method for estimating the fundamental frequency of monophonic vocal recordings. This work was conducted for our final project in the graduate-level Music Information Retrieval class at NYU Steinhardt.

If you'd like to read the whitepaper we wrote about WAFFL, you can find that here.

Installation

Currently, the best way to install and use the WAFFL package is to clone this repository and move the folder /WAFFL/waffl to the desired location. This should be the location your package manager installs new packages, and your Python installation looks for libraries. Alternatively, it could simply be the same folder as the Python project you'd like to use WAFFL in.

Usage

The model can be used to predict pitch contours for vocal recordings using the .predict_from_array and .predict_from_path methods. The returned Numpy arrays could be used for a variety of MIR tasks, including constructing feature sets for training other machine learning models. There are four output formats available: "raw_pitch", "nearest_note", "note_labels", and "midi". The return for each format is the following:

  • "raw_pitch": array of frequency values in Hz, with float32 precision. Unvoiced frames will be denoted by 0.0
  • "nearest_note": array of frequency values rounded to the nearest Hz value associated with a musical note
  • "note_labels": list of strings representing the note name and register at each frame, e.g. "C3" or "G#3/Ab3". Unvoiced frames will be denoted with the string "--"
  • "midi": array of MIDI note values (0-127)

If no output format string is passed to the prediction method, the default is "raw_pitch".

Example

Import the model into your Python project:

    >>> import waffl
    >>> model = waffl.WAFFL()

Make predictions using its predict methods:

    >>> model.predict_from_array(audio_array, fs, hop_length=320, nfft=4096, win_length=2048)
    >>> model.predict_from_path(audio_file_pathway, hop_length=320, nfft=4096, win_length=2048)

That's really all there is to it! Call help() on a waffl.WAFFL() object or either .predict_from methods for the full documentation on their usage.

Dependencies

The package requires Numpy and Librosa. In most cases you can simply pip install them.

waffl's People

Contributors

seangoldie avatar liebharc 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.