Inspiration
My starting point was blind travelers, who constantly need information that sighted people read at a glance: a platform number, a menu, a warning sign, which door is the entrance.
I also believe that if we get this right, the same idea can grow beyond blindness. Some of my friends are neurodivergent, including people on the autism spectrum, and I have seen how helpful it can be to have someone, or something, that helps decode what is happening in front of them. WayLens is a first step toward that kind of assistant: a camera that explains the scene in clear, calm language. Sometimes I see friends in situations they cannot fully make sense of, and it hurts me to see them left out of the moment the rest of us are living. I want technology that helps them take part, not just watch.
Cloud-only assistants fail exactly where this help is needed most: in a metro tunnel, abroad without data, or when a photo of a hotel room or a prescription should never leave the phone. That is why WayLens thinks on the device first.
What it does
WayLens is a Chrome web app that uses the camera to:
- Describe my surroundings: hazards first, then what is ahead, using clock positions.
- Read text and translate: signs, menus, tickets, with prices and gate numbers first.
- Answer questions about what the camera sees, typed or spoken.
Everything is read aloud and can be used with large buttons or keyboard shortcuts (D / R / A / P / Esc). It supports English and Spanish answers. Each answer announces where it was computed (on device or cloud) and how long it took, and while the model works the app says "Still looking…" every few seconds so a blind user never waits in silence.
How we built it
WayLens is built on Firebase AI Logic hybrid inference (Web SDK):
getGenerativeModelwithInferenceMode.PREFER_ON_DEVICEruns prompts with Gemini Nano in Chrome when the local model is available and falls back to Gemini in the cloud when it is not.- A Private mode uses
InferenceMode.ONLY_ON_DEVICE: nothing leaves the device. Voice input is disabled there because Chrome's speech recognition is an online service. - Each answer reports its origin through
response.inferenceSource. - Firebase App Check (reCAPTCHA Enterprise provider; a debug token is used in development) protects the AI Logic calls.
- The cloud model is configurable as a list (
VITE_CLOUD_MODEL): if a model is overloaded or out of quota, the app tries the next one. - Stack: Vite, vanilla JavaScript, Web Speech API,
getUserMedia. The code that calls Firebase AI Logic is insrc/ai.js.
Accessibility is the core design, not an add-on: screen-reader-first markup, aria-live status, high contrast, large touch targets, haptic feedback, adjustable speech speed, and error messages in plain language (timeout, quota, busy service, no connection, camera problems) shown and spoken instead of failing silently.
Challenges we ran into
- On-device models ignore cloud settings. The system instruction set for the cloud model does not apply to Gemini Nano, so the safety and style rules are also prepended to every prompt.
- Safety. A wrong "the street is clear" can hurt someone. The model is instructed to never claim a path or crossing is safe, and the UI says WayLens is an aid, not a replacement for a cane or guide dog.
- Privacy vs. convenience. Voice input improves usability but sends audio online, so Private mode turns it off and says why.
- Cloud models were overloaded or rate-limited while we tested (500, 503 and 429 errors), and one model name was retired for new projects. That pushed us to add retries, a model fallback list and clear error messages.
- Gemini Nano availability varies by device and browser. It requires Google Chrome with the Prompt API and Prompt API Multimodal Input flags enabled, plus a one-time model download. On our test machine (Chrome 158, Windows), Gemini Nano answered on-device both online and with Wi-Fi turned off; the cloud (Gemini via Firebase AI Logic) is used automatically when the local model is unavailable. On-device answers are less accurate than cloud answers and can include mistakes.
Accomplishments that we're proud of
- A working hybrid app: the same button gives an on-device answer with no internet and a cloud answer when the local model is not available.
- A Private mode where the photo never leaves the device.
- An interface designed to be used without seeing the screen: spoken progress, spoken errors and keyboard shortcuts.
What we learned
How hybrid inference decides between local and cloud, how to surface that decision to the user, how much accessibility depends on small details such as what gets announced and when, and how much cloud AI services change under demand (models retired, quotas, overload) so an app needs graceful fallbacks.
What's next for WayLens
Testing with blind and low-vision travelers, Android and iOS versions through the same SDK, more languages, and a continuous "walk with me" mode. We also want to explore, together with neurodivergent users and their families, whether scene explanations in simple language can help them; we have not tested this yet.
Built With
- chrome-prompt-api
- firebase-ai-logic
- firebase-app-check
- gemini-nano
- javascript
- vite
- web-speech-api