Chest · AI & data
StoneAnalysis
A Python tool that finds the notes in a sound file with a hand-written Fourier transform, and hides secret messages inside the audio.
archived
A sound file is a long list of numbers: the position of a loudspeaker, thousands of times per second. StoneAnalysis does two things with such a file. It tells you which notes are in it, and it can hide a message in it that nobody can hear.
How it works
To find the notes, the tool breaks the sound into its frequencies with a Fourier transform, written by hand in its fast version, then pinpoints each peak more precisely than the raw result allows.
To hide a message, it changes the tiniest part of each sample, a difference no ear can notice, and writes the message there one bit at a time, scrambled so that only the tool can read it back. Tests cover the full round trip, empty messages, files with nothing hidden and broken files.
What I took from it
- Implementing an algorithm yourself is the quickest way to see why the fast version exists.
- “Sounds identical” and “is identical” are different things, and a secret fits in the gap.