Audioscore software from Avid (not free though) claims to be able to so that.
"Convert CD tracks, MP3s, and WAV files to MusicXML, NIFF, MIDI, and PhotoScore files"
To what extent and precision I dont know...
You might need to have some music knowledge though since I guess, the audio gets first transcribe into music notation (there may come the need to edit ) and only from there into a midi file or other formats...
Interesting ...