Talk in Morse, With Your Eyes
The serious demos on this site are about money and statistics. This one is not. AreYouBlinking watches your webcam, measures how open your eyes are, and turns blinks into Morse code: a short blink is a dot, a long blink is a dash. Hold your eyes open for a beat to lock in a letter. Originally a joke about hostages blinking secret messages, now a real thing you can try. It all runs on your device in the browser, the video never leaves your computer.
Booting…
How to talk with your eyes
- Allow the camera when your browser asks. Nothing is recorded or uploaded, the frames are processed on your device and thrown away.
- Hit Calibrate and keep both eyes open for two seconds so it learns your resting eyes and sets a blink threshold for your face and lighting.
- Blink to send. A quick blink is a dot, a deliberate long blink is a dash. The Buffer shows the pattern building up.
- Pause to lock a letter. Stop blinking for about a second and the pattern is decoded to a letter. A longer pause adds a space between words.
A few easy ones to start with:
How it works under the hood
Every frame, Google's MediaPipe FaceLandmarker (a neural net compiled to WebAssembly, running on your GPU) returns 478 points mapped onto your face. Six of them outline each eye. From those I compute the Eye Aspect Ratio, the height of the eye divided by its width, which collapses toward zero the instant you close your eyes.
That raw number is noisy, so a small state machine turns it into clean events: eyes flip from open to closed when the ratio crosses a calibrated threshold, and a separate open threshold prevents a single blink from registering twice. The time your eyes stay shut decides dot versus dash, and the time they stay open decides where one letter ends and the next begins. A Morse lookup table does the rest.
I'd never written a line of JavaScript before this. The whole thing is a single vanilla JS file, no framework, and the source is on GitHub.