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

reference project

mp3 to wav

1
2
3
4
5
6
7
8
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

1
2
3
4
pip install -r ./requirements.txt
python3 ./setup.py install

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

play midi

1
2
3
sudo apt install timidity timidity-interfaces-extra

timidity -ig