Inspiration

People with ALS, locked-in syndrome, or patients on ventilators often have full awareness but can't speak or use their hands. Existing medical eye-tracking rigs cost around $15,000, require special infrared hardware, and are exhausting to use because you have to stare at tiny letters without blinking just to type a word. We wanted to see if a regular laptop webcam could do the same job reliably, without touching the user and without costing thousands of dollars.

What it does

Neuroscribe lets a non-verbal user navigate a 3x2 grid of high-contrast phrase cards using subtle eye gaze and head movement, then select a card with an intentional blink (350ms–850ms). Regular quick blinks under 250ms are ignored so you can blink normally.

Instead of forcing users to spell letter by letter, cards are organized into two quick levels (like Physical Needs -> I need water) and spoken aloud via text-to-speech. If the user talks or tilts their chin up to look at someone next to them, the screen automatically locks into standby so they don't accidentally click buttons while having a conversation.

We also built a companion Caregiver Mirror (/#partner) that runs on a nurse's or family member's phone over local Wi-Fi. It shows what the user is typing in real time, rings an alarm with vibration on urgent alerts like "Cannot Breathe", and lets the caregiver tap one button to send a confirmation back to the patient's screen.

How we built it

  • Biometric Engine: A Node.js backend runs @smartspectra/node-sdk in an isolated worker process (sdk-worker.mjs) to extract 478 facial landmarks, iris tracking, blink states, talking detection, and contactless heart rate / breathing traces strictly in RAM (nothing is saved to disk or sent to the cloud).
  • Real-Time Bridge: server.mjs supervises the SDK worker and streams normalized telemetry at 30 FPS over a local WebSocket (ws://localhost:8080), while also syncing phrases and urgent alerts across devices.
  • Frontend: Built with React 19, TypeScript, Vite, and Tailwind CSS. We used the Web Speech API for voice output and Web Audio API + Vibration API for bedside caregiver alerts.

Challenges we ran into

  • Raw eye jitter: Raw iris coordinates from a webcam are noisy, which made card selection jump around constantly. We had to layer a double exponential moving average filter (alpha = 0.12), hysteresis deadbands between cards, and a 150ms dwell check before focus switches.
  • macOS camera conflicts: Trying to run the native C++ SDK camera capture at the same time as the browser's webcam preview caused macOS AVFoundation to change frame dimensions mid-stream, crashing OpenCV (SIGABRT). We fixed this by locking capture to 1280x720 and isolating the native SDK in a separate child worker process that auto-recovers in 2 seconds with a smooth synthetic fallback if the camera resets.
  • Accidental triggers: Early on, looking up at someone or moving your mouth would trigger selections. Adding talking detection and pitch-angle gating solved this cleanly.

Accomplishments that we're proud of

  • Getting smooth, stable hands-free selection working on a normal MacBook webcam without any external sensors.
  • Keeping all video frames strictly in volatile memory with enableTelemetry: false and a mandatory pre-capture consent screen.
  • Building the two-way bedside phone loop so emergencies actually notify someone nearby and reassure the patient when help is coming.

What we learned

Human eyes naturally twitch and micro-saccade all the time, so raw tracking data is almost unusable in real UIs without proper filtering, hysteresis, and temporal hysteresis. We also learned how important it is to isolate native C++ addons in Node.js worker processes so a hardware or driver hiccup never takes down the whole app.

What's next for Neuroscribe

  • Adding custom phrase boards that caregivers can edit for each patient's daily routine.
  • Supporting multi-language text-to-speech voices.
  • Testing with real assistive-tech users and occupational therapists to refine blink timing and calibration ergonomics.

Built With

Share this project:

Updates

Submission history