Piano transcription inference
This toolbox is a piano transcription inference package that can be easily installed. Users can transcribe their favorite piano recordings to MIDI files after installation. To see how the piano transcription system is trained, please visit: https://github.com/bytedance/piano_transcription.
Demos
Here is a demo of our piano transcription system: https://www.youtube.com/watch?v=5U-WL0QvKCg
Installation
The piano transcription system is developed with Python 3.7 and PyTorch 1.4.0 (Should work with other versions, but not fully tested). Install PyTorch following https://pytorch.org/. Users should have ffmpeg installed to transcribe mp3 files.
pip install piano_transcription_inference
Installation is finished!
Usage
Want to try it out but don't want to install anything? We have set up a Google Colab.
python3 example.py --audio_path='resources/cut_liszt.mp3' --output_midi_path='cut_liszt.mid' --cuda
This will download the pretrained model from https://zenodo.org/record/4034264.
Users could also execute the inference code line by line:
from piano_transcription_inference import PianoTranscription, sample_rate, load_audio
# Load audio
(audio, _) = load_audio(audio_path, sr=sample_rate, mono=True)
# Transcriptor
transcriptor = PianoTranscription(device='cuda', checkpoint_path=None) # device: 'cuda' | 'cpu'
# Transcribe and write out to MIDI file
transcribed_dict = transcriptor.transcribe(audio, 'cut_liszt.mid')
Visualization of piano transcription
Demo. Lang Lang: Franz Liszt - Love Dream (Liebestraum) [audio] [transcribed_midi]
FAQs
This repo support Linux and Mac. Windows has not been tested.
If users met "audio.exceptions.NoBackendError", then check if ffmpeg is installed.
If users met the problem of "Killed". This is caused by there are not sufficient memory.
Applications
We have built a large-scale classical piano MIDI dataset https://github.com/bytedance/GiantMIDI-Piano using our piano transcription system.
Cite
[1] High-resolution Piano Transcription with Pedals by Regressing Onsets and Offsets Times, [To appear], 2020
Metadata
Release files for piano-transcription-inference 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| piano-transcription-inference-0.0.5.tar.gz | 13.5 kB | Without provenance | Details for piano-transcription-inference-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| piano_transcription_inference-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for piano_transcription_inference-0.0.5-py3-none-any.whl |
Total release size: 28.5 kB
Release files / piano-transcription-inference-0.0.5.tar.gz
| Download URL | piano-transcription-inference-0.0.5.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9db86e4a45ee5ab7a4171c1d3476aca6e6a0fb72b570ac2af7422901306958f6
|
|
BLAKE2b-256 checksum How to use checksums |
ecd762a53f0abeb1003535456a1f397fdb88e502b2bfbe4dfccd3b7cb0282cf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.5
|
Release files / piano_transcription_inference-0.0.5-py3-none-any.whl
| Download URL | piano_transcription_inference-0.0.5-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6abef166485e2be20c295b0bb75f154c4422f01bfb788d9d9b13be3484e64b5
|
|
BLAKE2b-256 checksum How to use checksums |
b5323a76a69b62a32f9fb575022230a231298d42e8930ce30452f515325f3448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.5
|
Security for piano-transcription-inference 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.