Thomas Edison recorded sound on tinfoil and played it back in 1877. That doesn't mean he was the first person to record sound, because that had already been done. But the first sound recordings couldn't be played back because there was no technology for doing so at the time. In the 1850s, French printer and bookseller Édouard-Léon Scott de Martinville created sound recordings by causing a stylus to transmit patterns of sound vibrations on soot-covered paper.
I cover a plate of glass with an exceedingly thin stratum of lampblack. Above I fix an acoustic trumpet with a membrane the diameter of a five franc coin at its small end—the physiological tympanum (eardrum). At its center I affix a stylus—a boar’s bristle a centimeter or more in length, fine but suitably rigid. I carefully adjust the trumpet so the stylus barely grazes the lampblack. Then, as the glass plate slides horizontally in a well formed groove at a speed of one meter per second, one speaks in the vicinity of the trumpet’s opening, causing the membranes to vibrate and the stylus to trace figures.
In the 21st century, specialists at First Sounds harnessed computers to digitize those "phonautographs" and decipher the sounds that created them. You can hear recordings going back as far as 1853, and listen to a podcast about the process of retrieving sounds recorded 166 years ago, at Kottke.