qiuqiangkong/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.
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +4
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPiano 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:
import librosa
from piano_transcription_inference import PianoTranscription, sample_rate
# Load audio
audio, _ = librosa.load(path=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
관련 프로젝트 살펴보기
불러오는 중…