The problem
It started with a question: "can I send text with nothing but sound — no network connection at all?" No Wi-Fi, no Bluetooth, no pairing. Just a speaker playing a sound and a microphone listening to it, accurately reconstructing arbitrary Unicode text. And it had to work outside a quiet room too — with background noise or music playing, still picking the designated tones out of everything else without losing the signal.
Encoding — one frequency per character
The text to send is UTF-8 encoded, then converted into a hex string. Unicode characters are already reduced to the 16 symbols 0-9 and A-F at this point, so everything downstream works identically regardless of the character set.
Each hex digit is assigned its own unique frequency. Add two more frequencies for START and END signals, and the whole scheme uses 18 tones.
| Symbol | Frequency (Hz) |
|---|---|
| START | 512 |
| 0–9 | 768–1920 (128Hz steps) |
| A–F | 2048–2688 (128Hz steps) |
| END | 2944 |
Chaining a START tone, then a tone per hex digit, then an END tone turns a string of text into a pure sequence of sine waves. Each tone plays for 0.1 seconds, rendered as a .wav at a 48kHz sample rate and sent out through the speaker.
Decoding — reading a microphone with FFT
The receiving side streams audio from the microphone and slices it into chunks. Once the amplitude crosses a threshold, the samples are treated as signal and buffered; once the buffer reaches one tone's length (4800 samples), an FFT (Fast Fourier Transform) extracts its frequency content.
The strongest frequency component is matched against the table above to decide which tone it is — two consecutive START detections mark the beginning of reception, two consecutive END detections mark the end, at which point the accumulated hex string is decoded back into UTF-8 text. Requiring two consecutive hits for START/END cuts down false positives from ambient noise.
Result
A phrase played through a laptop speaker gets picked up in real time by another device's microphone and reconstructed exactly. No internet, no Bluetooth, no pairing — data travels round-trip through nothing but sound in the air.