-
-
A real fix from the app: Jody turns "a el" into "al" and explains why, answered on device.
-
Hybrid inference: Apple's on device model answers first, and Gemini through Firebase AI Logic steps in when needed.
-
Every answer shows who wrote it: On device or Cloud.
-
In the chat, Jody fixes mistakes as you go and keeps the conversation going.
-
When the on device model can't answer, the app asks before any text goes to the cloud.
-
Fix my sentence: write it your way, get the right sentence and the reason in your own language.
Inspiration
I'm working on my own spoken English, and I noticed that learning a language is really just writing lots of small sentences and getting each one fixed fast. Most tutor apps send every word to a server. I wanted the quick answers to stay on the phone, and the cloud to step in only when the phone can't help.
What it does
saymode is a language tutor for iPhone. Jody, the tutor, fixes your sentences, explains new words and chats with you about your day in English, Spanish, French or German. She writes at your level, fixes your mistakes in a small card with the reason in your own language, and can read any of her messages aloud so you hear how it sounds. After a chat, Home shows a short summary of your progress. Every answer has a badge that says who wrote it: On device or Cloud.
How I used Firebase AI Logic
I built my own hybrid router. If Apple's on device model is ready and speaks both of your languages, it answers. If it can't, refuses, gives a bad answer or takes too long, the same request goes to Gemini through Firebase AI Logic. Both models run through Apple's LanguageModelSession, so one code path works for both and the badge is always right. The cloud model name comes from Remote Config, App Check protects every cloud call, and the app asks you before any text goes to the cloud. Anonymous sign in and Firestore keep each user's data private to them.
How I built it
Swift 6 and SwiftUI on iOS 27, Clean Architecture split into local Swift packages, written test first with 286 unit tests.
Challenges
The on device model sometimes repeats one sentence over and over, so a guard catches that and hands the request to the cloud. Asking it to fix and reply in one go was too slow, so the chat sends two small requests instead.
What I learned
How to make two very different models feel like one, and still be honest with the user about which one answered.
What's next
Streaks, spaced repetition for new words, and an Arabic interface.
Try it
TestFlight: https://testflight.apple.com/join/Ps1C1us8 (iPhone on iOS 27, no account needed)
Video: https://youtu.be/kRrU5hSfsls
Code: https://github.com/khaledm2225/saymode-ios-firebase-hackathon
Built during the submission period
saymode is a new project with no code from before 11 November 2026. The character art, logo and app icon were made with AI image generation and edited by me. Fonts are Bricolage Grotesque and Plus Jakarta Sans (SIL Open Font License). The video's voiceover, music and sound effects were made with AI audio tools.
