I wonder how far that could get in today's world of hair-trigger copyright lawsuits. A good AI would recognize the song (possibly even connect to an online database or neural net),estimate the amount of loss, then restore the bits to original fidelity. But record companies would of course want royalties for every such use, rendering it DOA.
Even without the financial aspect, how much should one invest when it's the same cost (whether one uses legal means or file sharing) to obtain the lossless version of a file versus the compressed version? True restoration would be a great proof-of-concept project though.