This is a submission for the Presage SmartSpectra SDK Challenge
What I Built
OnBlink lets someone speak a phrase or open an app using only their eyes and a regular webcam.
A blink signal opens a menu. The highlight steps through phrases like "Yes", "I need help" or "I'm thirsty", and a second signal picks one. The Mac says it out loud, or opens an app. It's built for people who can't easily speak or type, and for the people around them.
Highlights:
- Two ways to select. Double blink (SmartSpectra's built-in blink detection) or long blink (close your eyes for about a second), so people can use whichever signal is easiest for them.
- Your own phrases and apps. Add, edit, reorder and test menu items. Each one speaks a sentence or opens an app.
- Heart rate check-ins (optional). If someone's heart rate stays well above their own baseline level from earlier in the session, OnBlink offers a short check-in: "I am fine", "I need a break" or "I need help".
- Private option prompts (optional). Options can be read softly, or sent to headphones or a single earbud, while the chosen phrase is spoken out loud for everyone.
- Guided setup. A 10-step tutorial, a framing guide that waits until your face is in position, and a practice run.
Demo
Code
Repository: https://github.com/gavin-rose/onblink
Setup takes three commands (npm install, npm start, then paste a free Presage API key in the tutorial). The README covers requirements, usage, settings, data handling and how the detector was tuned. OnBlink runs on macOS.
How It Responds to Human Signals
OnBlink uses five live SmartSpectra signals:
| Signal | How OnBlink uses it |
|---|---|
| Blinking | Double blink input: blink, wait for "Blink again", blink once more |
| Face landmarks | Long blink input, measured from how open each eye is |
| Pulse rate | Live heart rate display and optional check-ins, using only readings the SDK marks stable |
| Talking | Ignores eye closures while the person is speaking |
| Validation status | Drives the framing guide, pauses input when the person moves out of view, and pauses check-ins during motion |
Integrating the SDK. OnBlink is an Electron app built on the SmartSpectra Node SDK. The renderer requests faceMetrics and cardioMetrics, decodes each metrics message, and feeds blinks, landmarks, talking and pulse into small, separate modules: the menu, the long blink detector and the check-in logic. The main process handles settings, speech and opening apps, and the page can only ask it to run a saved action by its id.
Long blink. SmartSpectra's blink signal is a short detection pulse, which is perfect for quick double blinks. For hold-based input, I measured eye openness directly from the face landmarks:
- Each eye is compared to its own recent level, so it works for people whose eyes naturally open different amounts.
- A closure that lasts 0.7 to 2.5 seconds counts as a long blink. It's ignored if the head moves or the person is talking.
- Some people find a deliberate one-second close easier than a quick double blink, and in my own testing setup it was the more dependable option. It's also very hard to trigger by accident, which matters when a false trigger means the computer speaks for you.
I tuned the thresholds with labeled recordings: I pressed a key after each blink, long blink and wink, then replayed the recordings through the detector. It caught all 5 deliberate long blinks and didn't fire on the 15 other labeled actions. The analysis scripts are in the repo's research folder.
Check-ins. During the first minute of steady readings, OnBlink learns the person's usual heart rate. If stable readings stay well above that level (15 bpm or 20% for 45 seconds on the default setting), it offers a check-in through the same menu. It only reacts to rises, waits until the person is in position and not using the menu, and appears at most once every 10 minutes. It's an offer to talk, never a health judgment.
Prize Categories
Best Thoughtful Real-World Use
The need. People with limited speech or movement often have the hardest time asking for the simplest things: a drink, help, or a break. Dedicated eye-tracking devices exist, but they're expensive and need special hardware. OnBlink only needs a laptop webcam.
Designed for the people using it:
- A choice of signal and pace. Double blink with relaxed or quick spacing, or long blink, plus an adjustable menu speed.
- Hard to trigger by accident. Single blinks are ignored, input pauses when the person is out of view, and the menu closes on its own if nothing is picked.
- Quick phrases first. Yes and No come first, then urgent needs, so common answers take the fewest steps.
- Speaking up without the effort of starting. The check-in gives someone an easy way to speak up when their body suggests something might be wrong.
- Considerate of the room. Option prompts can stay quiet or go to an earbud, so only the chosen phrase is spoken out loud.
- Doesn't stop on its own. The screen stays awake during a session, and auto stop is off by default, so nobody has to restart it.
- Easy for a caregiver to set up. A tutorial with a practice run, plus a settings screen with a Test button for every phrase.
Consent and Data Handling
- Consent first. Before the first session, OnBlink shows a plain-language consent screen, also part of the tutorial, explaining what the camera is used for. Nothing starts until the person accepts.
- Camera. On only after pressing Start, and off when pressing Stop or at an optional time limit.
-
SDK telemetry. Turned off (
enableTelemetry: false). Presage's telemetry and privacy document says the SDK transmits no telemetry when it's off. - Storage. OnBlink saves only the menu items, settings and the API key (encrypted with the macOS Keychain), locally on the user's computer. Deleting the app's settings folder removes everything.
- Never stored or sent. Video, eye or face data, and heart rate. The heart rate level used for check-ins is kept in memory only and discarded when the session stops.
- Sharing and AI services. OnBlink shares nothing and uses no AI services. Phrases are spoken locally by macOS, and only when the person picks them.
- Optional features. Check-ins are off until the person turns them on.
- Not a medical device. OnBlink is a communication aid. It does not diagnose, treat or monitor any condition, and it should not be relied on in an emergency. Check-ins are only an offer to talk.
Agent Session
I built OnBlink with Claude Code: exploring what the SDK could measure, recording and analyzing my own blink data, and building and refining the app. The SDK was pretty easy to understand and use but I definitely leaned hard into Claude for the visuals as that isn't normally my wheelhouse.
Top comments (0)