Your words. Your voice.
WriteOn is an ALS communication prototype that connects an adaptive writing aid to a handwriting-to-speech web application. It was developed for the BioHacks 2026 Wearable Devices and Quality of Life track.
The physical concept combines a 3D-printed marker mount, an adjustable strap system, a cap dock, and a phone support. This repository contains the full application, including real Gemini and ElevenLabs API integrations.
- Open the application on a laptop and sign in.
- Open Setup, enter a Gemini API key, and optionally enter an ElevenLabs key with Text to Speech and Voices read permissions.
- Click Connect phone, scan the QR code, and use the same account on the phone.
- Tap Start camera, allow camera access, and position the phone above the whiteboard. Keep the camera page visible and the phone awake.
- Write a message, move the writing hand out of frame, and press Capture writing on the laptop. An existing photo can also be uploaded.
- Review and correct Gemini's transcription, then press Speak. Choose an ElevenLabs voice or the separately labelled browser voice option.
- Press Stop or Escape to interrupt speech. End session clears the stored image and transcript for that session.
Nothing is spoken automatically. The space bar captures a photo when focus is outside form fields, links, buttons, and dialogs.
- React and TypeScript for the laptop and phone interfaces
- Vinext and Vite for the application build
- Tailwind CSS and custom CSS for the interface
- Google Gemini API for image-to-text transcription
- ElevenLabs API for text-to-speech
- Web Speech API for an optional browser voice
- Cloudflare Workers and D1 for the backend and session state
- QR codes for phone pairing
| Path | Purpose |
|---|---|
components/writeon.tsx |
Laptop pairing, review, API setup, and speech controls |
components/writeon-phone.tsx |
Phone camera, image capture, and reconnect logic |
lib/writeon-api.ts |
Session authorization and provider API requests |
app/api/[...path]/route.ts |
Backend route entry point |
db/ and drizzle/ |
Database schema and migrations |
tests/writeon-api.test.mjs |
SQLite-backed tests with mocked providers |
Use Node.js 24 or newer. Install the dependencies using the repository's pinned package manager and setup script:
npm run install:ci
npm run devRun the backend tests without live API credentials:
npm testBuild the application:
npm run buildThe backend targets a Cloudflare Worker with a D1 binding named DB. Apply the
SQL migrations in drizzle/ before exercising session routes. The hosted
application relies on an authenticated gateway that provides verified visitor
identity; a deployment elsewhere must implement equivalent authentication and
must not trust identity headers supplied directly by a client. The development
configuration provides mock authentication for local development only.
The hosting manifest included here contains no deployment identity. Register a new deployment and configure its identity and storage bindings when deploying your own copy.
No API credentials are included. Enter your own keys in Setup, or configure
the following server environment variables using the blank .env.example as
a reference:
GEMINI_API_KEY
ELEVENLABS_API_KEY
GEMINI_MODEL
The default Gemini model is gemini-3.5-flash-lite. Keys entered in Setup remain in
the laptop tab's memory and are cleared on refresh. They travel through the
backend to the selected provider and are not written to the database, browser
storage, or repository. The paired phone does not receive the provider keys.
The backend stores one current JPEG and transcript per session, with access restricted to its authenticated owner. Photos and transcripts expire after 30 minutes and sessions after eight hours; expired data is removed on later session access. Ending a session deletes its stored image and transcript immediately. Provider-side retention follows the applicable account terms.
WriteOn is intended for people who retain sufficient movement to write with support. Its fit, comfort, and clinical benefit have not been validated. Phone positioning and setup may require assistance, and handwriting recognition can make mistakes.
Automated provider tests use mocks. Live camera capture, provider credentials, account quota, transcription, and audio playback must be tested together on the demonstration devices before presenting the complete workflow as verified.
Third-party notices included with the source remain in their original files.
Transcription uses Gemini 3.5 Flash-Lite first, with one backup Gemini 3.8 Flash attempt for a timeout, temporary server error, or unavailable model. Provider deadlines are 20 seconds and 25 seconds. Authentication, quota, and invalid-request errors are returned immediately. Always review the transcription before speaking.