All projects

EnabledScience

A macOS app that lets blind students point at a printed page and ask questions about it by voice.

Role
Solo developer
Year
—
Status
In progress
Stack
Swift, Apple Vision, OpenCV, Whisper, React

What the app is doing

Drawn live in the browser. The four markers are the real ones the web editor paints for page 10000000 (IDs 14, 1, 31, 36); the camera, hand, drawing and sentence are an illustration, and the dwell is slowed down. Outline colours are the Mac overlay's: cyan live page, green markers, dashed orange idle area, solid green active area.

Overview

What it is

EnabledScience is designed for blind students. A teacher marks regions on a printed page in a web editor. A macOS app, still in development, tracks that page with a webcam and the student's finger over it, reads the region they rest on aloud, and answers spoken questions about it in Turkish.

Shot 1 · Printed page under the live camera, tracked: cyan quad, green marker outlines, orange areas · 8 s recording
Draft: a screen recording of the Mac app goes here.

Numbers

1,200+
Automated tests
4
Markers per page
550 ms
Dwell to speak
14
Voice states

macOS app

Tracking the page and the finger

The camera looks for four ArUco markers (OpenCV, DICT_4X4_50) printed around the page. Any three of them identify the page, so a hand covering one corner doesn't lose it. A RANSAC homography maps camera pixels onto the page, and an alpha-beta filter on the four page corners smooths it: while the paper is still the filter leans on its previous estimate (alpha 0.30), and once the corners move by more than 1 % of the page diagonal it follows the camera (alpha 0.85). If markers disappear, the app extrapolates for 0.2 s and shows an orange hold, then suspends tracking after 0.5 s. Touch only works while the page is live, and it locks again when the markers return.

The filter, its thresholds and the 0.2 s / 0.5 s timings are the app's; the jitter pattern comes from the benchmark test. The paper's path and the hands are an illustration.

Touch

Dwell with hysteresis

Apple Vision finds the index fingertip, and a small filter smooths it (alpha 0.45, or 0.8 above 900 px/s). If two fingertips are candidates, the app picks neither rather than guess. The point is mapped onto the page through the inverse homography, and a pure state machine decides what it touches. Each area, rotated or not, is hit-tested with two outlines: the finger has to get within 1 % of the page width (7.1 px) to start a dwell, but only leaving 3 % (21.3 px) cancels it, so jitter at the border can't flicker. After 550 ms the area is spoken once and won't repeat until the finger has been away for 0.5 s. Moving to another area interrupts the current speech.

A port of the dwell state machine, run on an invented fingertip path and slowed 3×. Envelopes, 550 ms dwell, 0.5 s debounce and EMA alpha (0.45, or 0.8 above 900 px/s) are the app's; the areas' sizes are illustrative.

Web editor

Authoring narrated regions

A React and Fabric.js editor for narrated regions and marker-based printouts. A teacher draws on an A4-landscape stage, drops an area over the part that should be touchable, rotates it and types the sentence to be spoken (up to 500 characters, up to 10 areas per page, no overlaps). "Download" exports a JPEG with the four real markers painted into the frame, ready to print. "Save" publishes only the areas to Firestore through a transactional Cloud Functions pipeline, limited to 20 saves an hour per teacher.

the web editor
Shot 6 · Drawing an AR area over a shape, rotating it in the properties panel, typing the spoken text, snap guides visible · 8 s recording
Draft: a screen recording of the editor goes here.

Contract

One page-space, two codebases

An area drawn in a browser has to land on the same spot of the physical paper in a camera pipeline written in another language. An earlier version of the contract failed at exactly this: widths were read as half, rotation was applied in the wrong space, and the marker boxes differed. Now both sides share one layout (a stage of 800 × 566, the inner page at 710 × 476, 30 px markers) and one rule: areas are stored normalized, but rotated in pixel space, because 710 : 476 isn't square. A golden fixture holds the expected corners, and both repos pin its SHA-256, so editing one copy breaks the other side's tests. The Mac side negates the angle, because its geometry helper rotates clockwise in y-up space.

The record is the golden case center-half-rot45; the corner numbers are computed with the contract's formulas and match the fixture. The skewed shape is what rotating in normalized space produces. Hashes are shortened; both repos pin the full SHA-256.

Marker identity

No shared triplets

The Mac recognizes a page from any three of its four markers, and only 50 marker IDs exist, so no two pages may share a triplet. A page ID is an 8-digit random number, and its four marker IDs follow from it deterministically (an FNV-1a hash seeds a mulberry32 shuffle of 0 to 49), so the printout can always be regenerated. On publish, a Cloud Function writes the page, its owner, one reservation for the marker set, four for its triplets, the revision and the hourly quota in a single transaction, or nothing. If a triplet is already taken, the save bounces with MARKER_SIGNATURE_COLLISION. The Mac applies the same rule and rejects both pages if two share three markers.

Page A is a real example from the contract: page 10000000 derives to markers 14, 1, 31, 36. The second page and its attempt are made up. The 50 marker patterns are the ones the editor paints.
Shot 7 · The exported JPEG: grey frame, four real ArUco markers, the drawing, areas hidden · still
Draft: the exported page, as printed.

Voice Q&A

Ask the page a question

A streaming Turkish voice pipeline: the question is transcribed with Whisper large-v3 (hosted on Groq), an OpenAI model writes the answer, and the Mac speaks it sentence by sentence with the system's Turkish voice. The model is grounded in the current page: it gets the page title, every area's text and the area the student touched last, so a question like "what is this?" has an answer.

The model never does the arithmetic for math questions. It returns a typed request, a sympy helper computes the result and a narrator turns it into spoken Turkish. An on-device hybrid retrieval engine (embeddings plus SQLite full-text search, fused with RRF) can add curriculum passages as extra context, but answers don't depend on it.

The whole conversation is a pure function from (state, event) to (state, effects), with 14 states. Listening gives up after 10 s of silence ("İhtiyacın olursa buradayım.", I'm here if you need me), a question has a 15 s deadline, and every request carries an ID, so a late answer to a cancelled question is ignored.

All 14 states and the timers are the app's; this run takes the lower branch (retrieval), not the math branch, and the timers run faster than real time. The question is made up; the Turkish phrases are the app's own, with glosses.

Next project

SUcore

An academic planner that checks credit, ECTS and degree requirements for every Sabancı major.

Shipped
  • React
  • TypeScript
  • Supabase
  • Playwright

© 2026 Emre Tutal