Inspiration## Inspiration
In many parts of India and emerging regions, mobile data connectivity is notoriously patchy. Conventional translation apps completely freeze when you lose signal—which is usually when you need translation the most (at rural railway stations, remote transit hubs, or during emergency travels). Furthermore, users frequently hesitate to send confidential personal voice conversations and sensitive messages over remote cloud servers. We created BolTranslate to address both challenges: delivering instant, offline, privacy-first translation powered by on-device AI, paired with seamless cloud intelligence when deep linguistic nuance is required.
What it does
BolTranslate is an intelligent hybrid-inference bilingual translation and voice conversation platform (Hindi ↔ English and multi-language):
- ⚡ On-Device Edge (Gemini Nano / Local Inference): Short, everyday spoken phrases (under 15 words) and quick travel interactions run 100% on the user's local device. It works in complete Airplane mode with zero latency (~15ms), zero cloud egress cost, and total data privacy.
- ☁️ Cloud Model (Google Gemini 1.5 Flash via Firebase AI Logic): Long-form paragraphs, formal correspondence, and complex cultural idioms automatically route to Google Gemini in the cloud for maximum linguistic fidelity.
- 🎙️ Two-Way Voice & Conversation Mode: Live speech-to-text input and instant text-to-speech audio pronunciation enable effortless bilingual dialogues between two people in real time.
- 🔍 Transparent Hybrid Badging & Telemetry: Every single translation explicitly displays its execution engine, latency benchmark (in ms), and privacy status.
- ✈️ Built-in Airplane Mode Simulator: A one-click toggle to demonstrate offline edge capability on screen.
How we built it
- Smart Routing Engine: A client-side heuristic router:
- If network is disconnected (
navigator.onLine === false) or Airplane Mode is toggled, all requests route to on-device edge execution. - If text length is ≤ 15 words, it runs locally via Chrome Built-in AI / on-device inference.
- Complex or long-form paragraphs (> 15 words) automatically query Google Gemini 1.5 Flash.
- Manual override toggle allows side-by-side benchmarking (Auto Hybrid vs Force On-Device vs Force Cloud).
- If network is disconnected (
- Frontend & UX: Developed with HTML5, vanilla ES6+ JavaScript, Tailwind CSS, and custom festive Indian Marigold & Rangoli theme supporting Dark & Light modes.
- Speech Integration: Web Speech API (
SpeechRecognition&SpeechSynthesis) for voice dictation and instant pronunciation. - Backend & Cloud: Firebase AI Logic / Google Gemini Developer API integration with fallback resilience.
Challenges we ran into
- Graceful On-Device Degradation: Ensuring that users running standard browsers without Chrome Canary Gemini Nano flags still enjoy blazing-fast, 100% offline edge functionality through a robust local lexical matrix.
- Bidirectional Idiom Translation: Accurately translating cultural colloquialisms (such as "नाच न जाने आँगन टेढ़ा") where literal translation fails.
- Real-Time Telemetry Calibration: Accurately measuring sub-millisecond on-device latency compared to network round-trip cloud queries.
Accomplishments that we're proud of
- Sub-20ms Offline Edge Translation: Blazingly fast translation that works seamlessly with zero Wi-Fi or mobile data in Airplane Mode.
- Complete Edge Privacy: 100% guarantee that short travel queries and sensitive phrases never touch an external server.
- Real-Time Split-Screen Conversation: Enabling two people speaking different languages to conduct an effortless conversation with auto-speaking audio.
What we learned
Hybrid inference is the future of client-side computing. Small, localized on-device models do not compete with cloud models—they complement them. Delegating high-volume micro-tasks to the edge slashes cloud server expenses by up to 70% while guaranteeing an unbreakable offline safety net.
What's next
- Expand local on-device dictionaries and model weights to 12+ regional Indian languages (Tamil, Telugu, Bengali, Marathi, Gujarati).
- Offline camera OCR for translating regional street signs and train schedules.
- Native Android app using Jetpack Compose and Firebase AI Logic Kotlin SDK.
What's next for olTranslate
Built With
- chrome-built-in-ai
- firebase
- firebase-ai-logic
- gemini
- gemini-nano
- html5
- javascript
- tailwind-css
- web-speech-api