Inspiration

In markets like Balogun (Lagos) and Dantokpa (Cotonou), in clinics and at transit hubs, language barriers cost people money, time and sometimes safety. People switch between English, French, Yoruba, Hausa, Igbo and Nigerian Pidgin all day. Commercial translation earbuds cost $200–$400, need special hardware, and send every private word to the cloud. We wanted live interpretation for anyone with an Android phone and ordinary earbuds, private by default.

What it does

  • Listen mode (Them → Me): transcribes the other person, repairs recognition slips, translates, and speaks the result into your earbuds in about 1–2 seconds.
  • Reply aloud (Me → Them): you speak, EarBridge translates, and plays it through the phone speaker even while earbuds stay connected.
  • On-device first, cloud when needed: Gemini Nano (AICore) is the default for validated languages (en, fr, es, de, pt, ko, zh, hi, ar). Low-resource languages (yo, ha, ig, pcm, sw), a downloading Nano model, or an unsupported phone route to Gemini in the cloud.
  • Privacy Guard (hybrid co-design): Nano scans each utterance first. Sensitive spans (names, phone numbers, amounts) are kept on-device or redacted to [NAME]/[PHONE]/[AMOUNT] before any cloud call, then restored locally.
  • Transparent routing: every line has a badge saying where it ran and why, e.g. "On-device · Nano · private" or "Cloud · fallback: Nano unavailable".
  • Noise gating: low-confidence, very short, non-speech fragments are ignored instead of translated.
  • Caption-only mode, earbud/speaker auto-detection, and session history in Firestore.

How we built it

Kotlin + Jetpack Compose (Material 3), coroutines/Flow. Firebase AI Logic hybrid inference (firebase-ai + firebase-ai-ondevice) with PREFER_ON_DEVICE, PREFER_IN_CLOUD and ONLY_ON_DEVICE model instances chosen by a TranslationRouter. Remote Config controls the validated language list, routing policy and prompts. Anonymous Auth gives judges zero-friction sign-in, Cloud Firestore stores sessions under per-user rules, and App Check protects the backend. Audio uses Android SpeechRecognizer with echo-cancel/noise-suppress, TextToSpeech, and MediaPlayer preferred-device routing for the speaker.

Challenges we ran into

  • Feedback loops: the phone transcribing its own speech. Fixed by pausing recognition during playback.
  • Forcing speaker output while Bluetooth earbuds are connected.
  • Phantom translations from noise or silence, solved with speech-presence gating and confidence filtering.
  • Recognizer errors on first start (error 11 and similar), solved by recreating the recognizer instead of reusing it.
  • Keeping on-device models coherent in single-turn mode by injecting recent dialogue as context.

Accomplishments that we're proud of

  • A real hybrid router where on-device is the default and the cloud fallback is visible and explained to the user.
  • A Privacy Guard that decides on-device what may leave the phone.
  • A side-by-side benchmark screen that runs the same sentence through on-device and cloud and shows the actual inference source and latency.
  • Unit tests covering every routing branch.

What we learned

How to balance latency, cost, privacy and language coverage with Firebase AI Logic's hybrid modes; managing the Gemini Nano download/availability lifecycle; and Android audio routing across earbuds and speakers.

What's next for EarBridge

Wear OS companion controls, more on-device languages as AICore expands, and multi-person group conversation rooms through Firestore.

Built With

  • android
  • android-aicore
  • cloud-firestore
  • firebase-ai-logic
  • firebase-app-check
  • firebase-authentication
  • firebase-remote-config
  • gemini
  • gemini-nano
  • jetpack-compose
  • kotlin
  • speech-recognition
  • text-to-speech
Share this project:

Updates

Submission history