{ "info": { "author": "Jong Wook Kim and Justin Salamon", "author_email": "jongwook@nyu.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Multimedia :: Sound/Audio :: Analysis" ], "description": "CREPE Pitch Tracker [![Build Status](https://travis-ci.org/marl/crepe.svg?branch=master)](https://travis-ci.org/marl/crepe)\n===================\n\nCREPE is a monophonic pitch tracker based on a deep convolutional neural network operating directly on the time-domain waveform input. CREPE is state-of-the-art (as of 2018), outperfoming popular pitch trackers such as pYIN and SWIPE:\n\n

\n\nFurther details are provided in the following paper:\n\n> [CREPE: A Convolutional Representation for Pitch Estimation](https://arxiv.org/abs/1802.06182)
\n> Jong Wook Kim, Justin Salamon, Peter Li, Juan Pablo Bello.
\n> Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), 2018.\n\nWe kindly request that academic publications making use of CREPE cite the aforementioned paper.\n\n\n## Installing CREPE\n\nCREPE is hosted on PyPI. To install, run the following command in your Python environment:\n\n```bash\n$ pip install --upgrade tensorflow # if you don't already have tensorflow >= 1.6.0\n$ pip install crepe\n```\n\nTo install the latest version from source clone the repository and from the top-level `crepe` folder call:\n\n```bash\n$ python setup.py install\n```\n\n## Using CREPE\n### Using CREPE from the command line\n\nThis package includes a command line utility `crepe` and a pre-trained version of the CREPE model for easy use. To estimate the pitch of `audio_file.wav`, run:\n\n```bash\n$ crepe audio_file.wav\n```\n\nor\n\n```bash\n$ python -m crepe audio_file.wav\n```\n\nThe resulting `audio_file.f0.csv` contains 3 columns: the first with timestamps (a 10 ms hop size is used by default), the second contains the predicted fundamental frequency in Hz, and the third contains the voicing confidence, i.e. the confidence in the presence of a pitch:\n\n time,frequency,confidence\n 0.00,185.616,0.907112\n 0.01,186.764,0.844488\n 0.02,188.356,0.798015\n 0.03,190.610,0.746729\n 0.04,192.952,0.771268\n 0.05,195.191,0.859440\n 0.06,196.541,0.864447\n 0.07,197.809,0.827441\n 0.08,199.678,0.775208\n ...\n\n#### Timestamps\n\nCREPE uses 10-millisecond time steps by default, which can be adjusted using \nthe `--step-size` option, which takes the size of the time step in millisecond.\nFor example, `--step-size 50` will calculate pitch for every 50 milliseconds.\n\nFollowing the convention adopted by popular audio processing libraries such as \n[Essentia](http://essentia.upf.edu/) and [Librosa](https://librosa.github.io/librosa/), \nfrom v0.0.5 onwards CREPE will pad the input signal such that the first frame \nis zero-centered (the center of the frame corresponds to time 0) and generally \nall frames are centered around their corresponding timestamp, i.e. frame \n`D[:, t]` is centered at `audio[t * hop_length]`. This behavior can be changed \nby specifying the optional `--no-centering` flag, in which case the first frame \nwill *start* at time zero and generally frame `D[:, t]` will *begin* at \n`audio[t * hop_length]`. Sticking to the default behavior (centered frames) is \nstrongly recommended to avoid misalignment with features and annotations produced \nby other common audio processing tools. \n\n#### Model Capacity\n\nCREPE uses the model size that was reported in the paper by default, but can optionally\nuse a smaller model for computation speed, at the cost of slightly lower accuracy.\nYou can specify `--model-capacity {tiny|small|medium|large|full}` as the command\nline option to select a model with desired capacity.\n \n#### Temporal smoothing\nBy default CREPE does not apply temporal smoothing to the pitch curve, but \nViterbi smoothing is supported via the optional `--viterbi` command line argument. \n\n\n#### Saving the activation matrix\nThe script can also optionally save the output activation matrix of the model \nto an npy file (`--save-activation`), where the matrix dimensions are \n(n_frames, 360) using a hop size of 10 ms (there are 360 pitch bins covering 20 \ncents each). \n\nThe script can also output a plot of the activation matrix (`--save-plot`), \nsaved to `audio_file.activation.png` including an optional visual representation \nof the model's voicing detection (`--plot-voicing`). Here's an example plot of \nthe activation matrix (without the voicing overlay) for an excerpt of male \nsinging voice:\n\n![salience](https://user-images.githubusercontent.com/266841/38465913-6fa085b0-3aef-11e8-9633-bdd59618ea23.png)\n\n#### Batch processing\nFor batch processing of files, you can provide a folder path instead of a file path: \n```bash\n$ python crepe.py audio_folder\n```\nThe script will process all WAV files found inside the folder. \n\n#### Additional usage information\nFor more information on the usage, please refer to the help message:\n\n```bash\n$ python crepe.py --help\n```\n\n### Using CREPE inside Python\nCREPE can be imported as module to be used directly in Python. Here's a minimal example:\n```python\nimport crepe\nfrom scipy.io import wavfile\n\nsr, audio = wavfile.read('/path/to/audiofile.wav')\ntime, frequency, confidence, activation = crepe.predict(audio, sr, viterbi=True)\n```\n\n## Argmax-local Weighted Averaging\n\nThis release of CREPE uses the following weighted averaging formula, which is slightly different from the paper. This only focuses on the neighborhood around the maximum activation, which is shown to further improve the pitch accuracy:\n\n

\n\n## Please Note\n\n- The current version only supports WAV files as input.\n- The model is trained on 16 kHz audio, so if the input audio has a different sample rate, it will be first resampled to 16 kHz using [resampy](https://github.com/bmcfee/resampy).\n- Due to the subtle numerical differences between frameworks, Keras should be configured to use the TensorFlow backend for the best performance. The model was trained using Keras 2.1.5 and TensorFlow 1.6.0, and the newer versions of TensorFlow seems to work as well.\n- Prediction is significantly faster if Keras (and the corresponding backend) is configured to run on GPU.\n- The provided model is trained using the following datasets, composed of vocal and instrumental audio, and is therefore expected to work best on this type of audio signals.\n - MIR-1K [1]\n - Bach10 [2]\n - RWC-Synth [3]\n - MedleyDB [4]\n - MDB-STEM-Synth [5]\n - NSynth [6]\n\n\n## References\n\n[1] C.-L. Hsu et al. \"On the Improvement of Singing Voice Separation for Monaural Recordings Using the MIR-1K Dataset\", *IEEE Transactions on Audio, Speech, and Language Processing.* 2009.\n\n[2] Z. Duan et al. \"Multiple Fundamental Frequency Estimation by Modeling Spectral Peaks and Non-Peak Regions\", *IEEE Transactions on Audio, Speech, and Language Processing.* 2010.\n\n[3] M. Mauch et al. \"pYIN: A fundamental Frequency Estimator Using Probabilistic Threshold Distributions\", *Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP).* 2014.\n\n[4] R. M. Bittner et al. \"MedleyDB: A Multitrack Dataset for Annotation-Intensive MIR Research\", *Proceedings of the International Society for Music Information Retrieval (ISMIR) Conference.* 2014.\n\n[5] J. Salamon et al. \"An Analysis/Synthesis Framework for Automatic F0 Annotation of Multitrack Datasets\", *Proceedings of the International Society for Music Information Retrieval (ISMIR) Conference*. 2017.\n\n[6] J. Engel et al. \"Neural Audio Synthesis of Musical Notes with WaveNet Autoencoders\", *arXiv preprint: 1704.01279*. 2017.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/marl/crepe", "keywords": "tfrecord", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "crepe", "package_url": "https://pypi.org/project/crepe/", "platform": "", "project_url": "https://pypi.org/project/crepe/", "project_urls": { "Homepage": "https://github.com/marl/crepe", "Source": "https://github.com/marl/crepe", "Tracker": "https://github.com/marl/crepe/issues" }, "release_url": "https://pypi.org/project/crepe/0.0.9/", "requires_dist": null, "requires_python": "", "summary": "CREPE pitch tracker", "version": "0.0.9" }, "last_serial": 5993517, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "2439ce4a71e4e82b7712a174d017a7ad", "sha256": "46769c58fd5163ff367ea4ddd3a9bdce9bda7e7f796330508f2bbe0e94162f46" }, "downloads": -1, "filename": "crepe-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2439ce4a71e4e82b7712a174d017a7ad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8311, "upload_time": "2018-04-17T10:23:36", "url": "https://files.pythonhosted.org/packages/12/04/540f9a8c32e9a9a45ee94dab6728b809610e86195fe14fcd772248b2f926/crepe-0.0.0-py3-none-any.whl" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "5b17c979e2d3970389a1209e13ad61a2", "sha256": "431a4445f8484209b4e72efcfbc33268e60d551d02edaed22f6035ac35c26941" }, "downloads": -1, "filename": "crepe-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5b17c979e2d3970389a1209e13ad61a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57654948, "upload_time": "2018-04-18T09:07:02", "url": "https://files.pythonhosted.org/packages/07/29/e5c2438f55e730d2d6833171dd5ea8319bf7af0ea6ac529e49bf6e8ebf9c/crepe-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "1d119ff6bf45dab1ca4590a367181f43", "sha256": "86d4e5066f54d0644e5645c9798552493820fcaf3f1cec97facfbecc0aa47ff9" }, "downloads": -1, "filename": "crepe-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1d119ff6bf45dab1ca4590a367181f43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57654973, "upload_time": "2018-04-18T09:21:19", "url": "https://files.pythonhosted.org/packages/4c/51/8623d4386a87d513045e96e17790621da7c73cb8eeaf98193424a6c3f21a/crepe-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "90e427e5c3d12476a078ffcb4fbccb63", "sha256": "6da08e2e3bf14c77b77c02c1e7133ab6807ab7799a68a8a2fe538d0b218de9d4" }, "downloads": -1, "filename": "crepe-0.0.3.tar.gz", "has_sig": false, "md5_digest": "90e427e5c3d12476a078ffcb4fbccb63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57655412, "upload_time": "2018-04-26T08:21:37", "url": "https://files.pythonhosted.org/packages/9c/4d/668a52f345925e22e2eaf9f44c64ba2f00ce636ebdb4bc1d323fedd562fe/crepe-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8b140ce4b505aeba1619ae309f862830", "sha256": "5cd076994e60b7b419968721701cba469b3914e1cd83b1842823990c3bfda939" }, "downloads": -1, "filename": "crepe-0.0.4.tar.gz", "has_sig": false, "md5_digest": "8b140ce4b505aeba1619ae309f862830", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57655288, "upload_time": "2018-05-08T00:24:59", "url": "https://files.pythonhosted.org/packages/f0/e3/0517f701c04966078570965ce55fe87ff61b74131a2393464888844ab485/crepe-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "8c4d95a4946bafd017e58e9bab320679", "sha256": "960d5bf30b2c7f4e0406577f14538092522c5f633486c0d02920fe6756ef2015" }, "downloads": -1, "filename": "crepe-0.0.5.tar.gz", "has_sig": false, "md5_digest": "8c4d95a4946bafd017e58e9bab320679", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57656897, "upload_time": "2018-05-10T16:51:33", "url": "https://files.pythonhosted.org/packages/67/f2/6f95ee54b7632bd334bc9c4dd78ae693f62dc4be9fdd58c51e844cac6679/crepe-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "a39ce547e8eda1b04bc46d2431149f3e", "sha256": "f07be81606fc56d4540699a609e9ded974cc4580309e8e2465943abb36c2a842" }, "downloads": -1, "filename": "crepe-0.0.6.tar.gz", "has_sig": false, "md5_digest": "a39ce547e8eda1b04bc46d2431149f3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14118, "upload_time": "2018-05-31T22:33:16", "url": "https://files.pythonhosted.org/packages/ff/32/859cf3a18fcd3de9c5c50db2d7a521031ab7ecc09392ccba804dadda8501/crepe-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "a11edaf5c9fd81c2f68f2b5945dff4e5", "sha256": "a0b9b6dc7414be6f233c8fe582923c363618dde954667dae25c8980b96b17adc" }, "downloads": -1, "filename": "crepe-0.0.7.tar.gz", "has_sig": false, "md5_digest": "a11edaf5c9fd81c2f68f2b5945dff4e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11623, "upload_time": "2018-07-13T16:11:18", "url": "https://files.pythonhosted.org/packages/a9/77/7caef0a698f515aede2feb1998b1ed1a6a6d5b65d985044057679f62ac99/crepe-0.0.7.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "2820402a706ad0fa8d1c31cb8a391918", "sha256": "c87e97d1841dab27cb221c815a304908a5a5cd997b8209c149986da0e9d1bf45" }, "downloads": -1, "filename": "crepe-0.0.9.tar.gz", "has_sig": false, "md5_digest": "2820402a706ad0fa8d1c31cb8a391918", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15489, "upload_time": "2019-10-18T03:40:01", "url": "https://files.pythonhosted.org/packages/fc/d4/348f7461bd4b6fea2917f3f35320defe3bed179990e8ee387fdf995d09e3/crepe-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2820402a706ad0fa8d1c31cb8a391918", "sha256": "c87e97d1841dab27cb221c815a304908a5a5cd997b8209c149986da0e9d1bf45" }, "downloads": -1, "filename": "crepe-0.0.9.tar.gz", "has_sig": false, "md5_digest": "2820402a706ad0fa8d1c31cb8a391918", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15489, "upload_time": "2019-10-18T03:40:01", "url": "https://files.pythonhosted.org/packages/fc/d4/348f7461bd4b6fea2917f3f35320defe3bed179990e8ee387fdf995d09e3/crepe-0.0.9.tar.gz" } ] }