The phonograph was a word before it was a machine. For four decades it meant a squiggle on paper.
Etymonline records phonograph from 1835 as "a character representing a sound," a symbol used in phonography. Phonography meant writing by sound. Isaac Pitman's well-known phonographic shorthand of 1837 transcribed sound rather than abbreviated spelling. The parts are Greek: phone, "sound" or "voice," and -graph, "something written." A phonograph was literally a piece of sound writing. That older sense is now rare and obsolete.
The machine came out of the telegraph business. The Library of Congress explains that Thomas Edison was working on a device to record telegraph messages as indentations on paper tape. That made him wonder whether a telephone message could be captured the same way. He tested a diaphragm with an embossing point held against moving paraffin paper. Later he swapped the paper for a metal cylinder wrapped in tin foil.
The famous date for the first success, August 12, 1877, is shakier than it looks. The Library of Congress says that date was "later stated," and historians think the test happened several months later. What is firmer is the paperwork. Scientific American described a demonstration in its December 22, 1877 issue. Edison filed his patent application on December 24, and the patent was issued on February 19, 1878. For the first test he spoke a well-known nursery rhyme into the machine and heard it played back.
When Edison gave the machine the old shorthand name, the meaning of -graph shifted. Etymonline notes that by 1877 it had come to mean an instrument for recording. Not everyone liked the result. A writer in 1880 argued the device was "really a reproducer or regenerator of sound" and proposed calling it the "Palingenophone."
Rivals then reshuffled the same Greek parts. Chichester Bell, a cousin of Alexander Graham Bell, and Charles Sumner Tainter improved the machine by using wax in place of tin foil. Their version, patented in 1886, was shown to the public as the graphophone. Emil Berliner trademarked gramophone in 1887, an inversion of phonogram. Etymonline says that in North America phonograph became a synonym for record player, while British English settled on gramophone.