Well, there are software/hardware combinations that will do this, albeit imperfectly (as far as I know.)
But it's really the long way around for most purposes--there is so much piano music available as sheet music already, and now a lot of it comes with audio examples or even video. And of course there is quite a bit of software to teach one's self piano, not to mention videos on specific styles and techniques.
And if you want to learn very specific songs which aren't available for some reason, often a good teacher is your best bet. (Some teachers are also good 'transcribers' who can listen and figure out what the notes and rhythms are.)