craffel/pretty-midi

[HELP] How to convert .mid to .mp3?

gongel opened this issue · 1 comments

Thanks.

import pretty_midi
import librosa

pm = pretty_midi.PrettyMIDI("filename.mid")
audio = pm.fluidsynth(fs=44100)
librosa.output.write_wav("output.wav", audio, 44100)