MP3 to Wav to Midi

2022-03-01 13:12:35 浏览数 (2)

Converting mp3 to wav to midi is a task that extract notes from original mp3 files by computer.

reference project

  • audio/wav to midi​

mp3 to wav

代码语言:javascript复制
from pydub import AudioSegment

# files                                                                       
src = "/dir/to/the/file.mp3"
dst = "/dir/to/result/file.wav"
                                                    
audSeg = AudioSegment.from_mp3(src)
audSeg.export(dst, format="wav")

wav to midi

代码语言:javascript复制
pip install -r ./requirements.txt
python3 ./setup.py install

audio-to-midi /path/to/audio/file.wav -b 120 -t 250 -s

play midi

代码语言:javascript复制
sudo apt install timidity timidity-interfaces-extra

timidity -ig

0 人点赞