Piano transcription inference toolbox
Project description
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
Install PyTorch (>=1.4) following https://pytorch.org/
$ python3 setup.py install
Usage
python3 example.py --audio_path='resources/cut_liszt.mp3' --output_midi_path='cut_liszt.mid' --cuda
For example:
import librosa
from piano_transcription_inference import PianoTranscription, sample_rate
# Load audio
(audio, _) = librosa.core.load('resources/cut_liszt.mp3', sr=sample_rate, mono=True)
# Transcriptor
transcriptor = PianoTranscription(device=device)
# 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]
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for piano-transcription-inference-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d3f29d4e2e2451707d74ee66691d2fb5b46cff8aefd4fabc515c0254a9fdf1 |
|
MD5 | a6c3891c36485be08467a6498e0b4346 |
|
BLAKE2b-256 | d84e6dae5042793ca0ae6cec98066d3e67fe8937d487a11dbf573b02e834dbda |
Hashes for piano_transcription_inference-0.0.1-py3.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | dde52983ec7bc9b3a88d972ff5f634432973ae70f4b3b13cb6824d26006127cd |
|
MD5 | ffe29bef9bf2940d5bb070a62fbe3280 |
|
BLAKE2b-256 | 1c70c2f74bf5f7a7c912c557d885d9c6baea3e9a8a191b7f039927cffad3624f |
Hashes for piano_transcription_inference-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e08f288dc7f8093f955bc3812937283c5f56f8d20971fffa45612f825de7421 |
|
MD5 | 3141910a283e38d5525e8b56dbd79cb2 |
|
BLAKE2b-256 | cafc1443cf582808fae4b92918606e5608d322e9a558bc1ec4843f6468bb93a5 |