Giter Club home page Giter Club logo

harmof0's Introduction

HarmoF0 Pitch Tracker

This repo is the Pytorch implementation of "HarmoF0: Logarithmic Scale Dilated Convolution For Pitch Estimation".

HarmoF0 is a light-weight and high-performance pitch tracking model using multi-rate dilated convolution. The evaluation results with threshold of 50 cents are:

Installing and usage

Install required packages and harmof0 using

$ pip install -r requirements.txt
$ python setup.py install

Estimating pitch of an audio file or folder using pretrained harmof0. HarmoF0 supports wav, mp3 and flac.

$ harmof0 test/a.mp3 
$ harmof0 test

The results are saved in test/a.f0.txt and test/a.activation.png by default.

a.f0.txt

# time frequency activation
0.000 27.500 0.000
0.010 27.500 0.000
0.020 27.500 0.000
0.030 27.500 0.000
0.040 27.500 0.000
0.050 27.500 0.000
0.060 27.500 0.000
0.070 27.500 0.000
0.080 55.000 0.047
0.090 55.000 0.032
0.100 59.118 0.062

a.activation.png

Use post processing:

harmof0 test --post-processing=True

a.activation.post.png

Use specified output dir and device:

$ harmof0 test/a.mp3 --output-dir=output --device=cuda

For more information:

$ harmof0 --help

Usage inside Python

Import harmof0 as module:

import harmof0
import torchaudio

pit = harmof0.PitchTracker()
waveform, sr = torchaudio.load('test/a.mp3')
time, freq, activation, activation_map = pit.pred(waveform, sr)

harmof0's People

Contributors

wx-wei 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.