The earliest sound recording was made in 1857 by Edouard-Leon Scott de Martinville, a Parisian. Wikipedia, as usual, offers the details on de Martinville’s invention:
From 1854 he became fascinated in a mechanical means of transcribing vocal sounds. While proofreading some engravings for a physics textbook he came across drawings of auditory anatomy. He sought to mimic the working in a mechanical device, substituting an elastic membrane for the tympanum, a series of levers for the ossicle, which moved a stylus he proposed would press on a paper, wood or glass surface covered in lampblack. On 26 January 1857, he delivered his design in a sealed envelope to the French Academy.  On 25 March 1857, he received French patent #17,897/31,470 for the phonautograph.
The first recording can be heard at First Sounds. It is the song is an almost intelligible snippet of Au Clair de la Lune (“ Don’t expect Dark Side of the Moon production here” is the way First Sound puts it).
de Martinville didn’t think anyone would actually play back the sound. Unlike Edison’s later recordings (starting with Mary Had a Little Lamb in 1877), de Martinville’s device was for research. A few years ago scientists developed software that could read the impressions and play them back. The full story is in the Wikipedia entry and elsewhere on the Web. It’s very interesting stuff.
Listen to the snippet–and then consider that the person–originally thought to be de Martinville’s daughter, but now thought to be him. It’s truly a voice from the past: He was singing four years before the Civil War began and eight years before Lincoln died.