Baba: Building a Gender-Aware AI Hebrew Translation App
Most translators guess who is speaking, and in Hebrew a wrong guess is a grammar mistake. A woman says אני עייפה (ani ayefa, "I'm tired"). A man says אני עייף (ani ayef). Baba asks first. We built it as native Swift and Kotlin apps that send the speaker and the audience to OpenAI or Gemini, with automatic fallback, Supabase sync and Pro subscriptions on both stores.

Baba at a glance
| Fact | Detail |
|---|---|
| Product | English and Hebrew AI translator that conjugates for speaker and listener |
| Built by | Mobilions, January to October 2025. Launched April 2025, about 4 months |
| Platforms | Native iOS (Swift) and Android (Kotlin) |
| Gender modes | 6 audience modes, plus speaker gender from the profile: 12 combinations |
| AI providers | OpenAI and Gemini, in-app router with automatic fallback |
| Backend | Supabase Auth, Postgres and Edge Functions. Prompts versioned on our server |
| Payments | StoreKit 2 and Google Play Billing, one Pro entitlement across both |
| Free tier | 7,500 characters a month, metered per device |
| Typical response | 300 to 400 milliseconds for a short sentence |
| AI cost per free user | About $0.005 to $0.041 a month (illustrative) |
| Usage since launch | 130,000+ translations, reported by the client (July 2026) |
Client Snapshot
- Product
- baba Hebrew Translator (App Store and Google Play)
- Client
- US-based language-tech startup
- Engagement
- January to October 2025. Concept to launch in about 4 months, then ongoing work
- Market
- English speakers using Hebrew, mainly in the US and Israel
Services Delivered
Native iOS and Android development. LLM integration: gender-context prompt design, OpenAI and Gemini routing with fallback, response normalization, server-side prompt versioning. Supabase backend. In-app subscriptions on both stores with server-side verification and usage metering.
Technology Stack
Swift and Kotlin clients, each handling right-to-left Hebrew rendering, purchases and the model router. OpenAI (gpt-5, gpt-4o, gpt-4o-mini) and Gemini (gemini-2.0-flash, gemini-2.0-flash-lite) for translation and transliteration. Versioned prompts from our server. Supabase Postgres and Auth for translations, favorites, usage and entitlements, with purchase verification in Edge Functions.
The Challenge
English doesn't say who is speaking. Hebrew grammar needs to know, so a translator has to guess.
Where Hebrew marks gender, and where it doesn't
| Form | Changes with | Example |
|---|---|---|
| Present-tense verbs and adjectives | Speaker (and number) | אני עייף / אני עייפה (ani ayef / ani ayefa) |
| Second-person forms ("you") | Listener, in every tense | אתה / את / אתם / אתן (ata / at / atem / aten) |
| First-person past and future | Nothing. Same for everyone | הלכתי (halakhti, "I went") |
That third row matters more than it looks. Because "I went" is identical for everyone, asking about gender on every translation adds friction to sentences where nothing changes. Mixed groups take the masculine plural אתם (atem), which is grammar, not a product choice.
One English sentence, three correct Hebrew sentences: "I'm tired, can you help me?"
| Speaker to listener | Hebrew | Transliteration |
|---|---|---|
| Man to man | אני עייף, אתה יכול לעזור לי? | ani ayef, ata yakhol la'azor li? |
| Woman to man | אני עייפה, אתה יכול לעזור לי? | ani ayefa, ata yakhol la'azor li? |
| Woman to group of women | אני עייפה, אתן יכולות לעזור לי? | ani ayefa, aten yekholot la'azor li? |
Hebrew reviewed by the product owner, a native Israeli speaker.
Four problems followed from that. Getting gender context without a form to fill in. Normalizing two providers that return different shapes. Surviving a provider's bad minute mid-conversation. And making history and Pro follow the user across iPhone and Android, with no sync server of our own.
Our Approach
Discovery: gender is a grammar problem before it's a model problem. Mapping where Hebrew marks gender told us the model needs three inputs: who is speaking, who is listening, and whether either is a group. So speaker gender is set once in the profile, and the audience is chosen on the translate screen, where it can change per sentence. Three rules came out of it: gender goes to the model as an explicit parameter, no single provider can be a point of failure, and no custom sync server.
Discovery also changed where the prompt lives. At first every prompt was hardcoded in the app, so any change meant a release and App Store review, and a one word fix took a week. Translation quality is something you tune constantly. The prompt behaves like content and we were shipping it like code. We moved prompts to the server, versioned and fetched at runtime, with a bundled copy as the offline fallback.
Build order followed the risk: translation loop with one provider, then gender modes and prompt testing, then the second provider and fallback, then history and sync, then subscriptions and metering.
Engineering Decisions
Three decisions shaped Baba. Each has a reason and a cost.
01 Gender goes to the model as exact Hebrew forms, not as a rule to follow
How: the app resolves the speaker and audience pair before the request leaves and writes the exact forms into the prompt. Short text returns strict JSON; long text streams, because partial JSON can't be displayed.
Why it works: it's the context-injection idea researchers tested on Google Translate in 2019, where prefixing English with "She said to them:" pushed output towards feminine-speaker, plural-audience forms (Moryossef et al.).
Costs: the system prompt becomes most of the input tokens on a short sentence, and a third person ("my doctor said she...") is still the model's inference.
From the build: The sentence that taught us this was "I'm ready when you are", written by a woman to a male friend. The first prompt returned אני מוכן כשאתה מוכן. It should have returned אני מוכנה כשאתה מוכן. One letter, the ה at the end of מוכנה (mukhana), and the output had told a woman she was a man. That sentence is the right test because it holds two people: the speaker is female, the listener male, so the first adjective needs feminine agreement and the second masculine. Our early prompt described Hebrew gender in general terms and left the model to work it out. It resolved the ambiguity the way models do, choosing masculine for everything and staying consistent about it. The fix was to stop explaining and start supplying.
02 A model router with automatic fallback between OpenAI and Gemini
How: one router in the app owns every provider call. Try the preferred provider, then on error or timeout send the same request to the other, and normalize either answer into one structure.
Costs: the providers word translations differently, so the same input can return slightly different Hebrew. Worst case is the timeout plus one full call to the second provider.
From the build: The retry crosses providers rather than repeating the same one. A provider that has just returned a rate limit is the least likely thing to succeed a second later. One retry, no backoff, because somebody is watching a loader. The timeout is the part we got wrong. We never set one, so it ran on the platform default of 60 seconds. That only matters once you pair it with a retry: a failure plus one retry is two minutes before anything appears, which nobody waits for. Around 15 seconds is the right order.
03 Supabase as the single backend, instead of a custom sync server
How: each translation is one Postgres row. Devices keep a local history database and sync on open or refresh. Conflicts resolve by last write wins on an updated_at set by the database, not the phone, so a wrong clock can't overwrite newer data.
Costs: sync isn't instant, and "last" means last to reach the server, not last edited. Two offline phones toggling the same favorite means the one reconnecting last wins, even with the older edit. Translations are appended rather than edited, so we took that over building merge logic.
From the build: The worst sync bug wasn't in the rows, it was in who the rows belonged to. You could use the app without an account, and the free tier was counted against the account. A guest has no account. So a guest who ran out could exit, start a new session, and get a fresh allowance, repeatedly. From the server it didn't look like abuse. It looked like a lot of new guests arriving. The fix was to move the limit onto the device. On first run the app generates a random ID and stores it in the keychain, because normal app storage is wiped on delete and a reinstall would have handed out another free tier. On Android we use Settings.Secure.ANDROID_ID, stable across reinstalls for the same device and signing key, though not a factory reset. The limit now follows the device rather than the person, so a phone and a tablet get two allowances. We took that deal, because the loophole was spending real API money on every reset.
Performance, Cost and Security
We went native in Swift and Kotlin because each platform's own text system handles right-to-left Hebrew next to left-to-right English, and StoreKit 2 and Play Billing are first-party. The cost is two codebases.
A short sentence returns in 300 to 400 milliseconds. Long text is slower, because the model generates token by token, so above a length threshold the app streams. Transliteration is the expensive part of the output, so it's the first thing dropped as input grows.
The system prompt measures 220 tokens on the shortest path and 354 on the longest, counted with o200k_base. Don't estimate it by dividing characters by four: Hebrew costs far more tokens per character than English.
What a free user costs in AI fees (illustrative, not Baba's bill)
| Assumption | Value |
|---|---|
| 7,500 free characters, 150 per request | 50 requests a month |
| System prompt 300 tokens (measured midpoint) | about 18,750 input, 7,125 output tokens |
| At $0.10 and $0.40 per 1M tokens | about $0.005 per free user per month |
| At $0.75 and $3.75 per 1M tokens | about $0.041 per free user per month |
| Per 1,000 short translations | about $0.09 to $0.82 |
The system prompt is about 80% of input tokens on a short sentence, so shortening it saves more than trimming user text. Reasoning models bill hidden reasoning tokens as output, which multiplies these figures.
Security: iOS purchases are verified on the server as StoreKit 2 transactions; Android purchase tokens are checked with the Google Play Developer API. The entitlement belongs to the user account, so Pro bought on one store unlocks the other. Row-level security limits each user to their own translations.
Engineer's Notes
We never had the realisation that Hebrew gender is two axes. It was handed to us on day one. Our product owner is a native Israeli speaker, and he gave us the requirement before we wrote any translation code: the output has to know who is speaking and who is being spoken to, and those are two separate things. That saved us from the bug most teams would ship. Coming at Hebrew from the English side you naturally build one gender setting, because nothing in English suggests there are two.
The most surprising failure had nothing to do with translation. Our translate screen opened slowly for months, and the symptom pointed at the wrong layer the whole time. A screen that is slow after a tap looks like a navigation problem. The real cause was the local history database opening its file on the main thread while the screen was being built. We found it with the profiler, not by reading code, because there was nothing wrong with the code we kept reading.
Limitations and Lessons
Build an evaluation set before you need one. We had none. Every prompt change was checked by hand against whichever sentences had recently broken.
Automatic scores miss gender errors. In the 2019 study, even a wrong-gender prefix raised the BLEU score. Test gender with a targeted sentence set and a native speaker.
The modes can't express everything. There's no form for a non-binary speaker, and a paragraph that turns to address someone else halfway can't be expressed, because the audience is a mode rather than inline markup.
Outcome
Baba went from concept to launch in about four months and is live on both the App Store and Google Play, with one Pro entitlement that works across both. The client reports 130,000+ translations since launch (July 2026). The gender-aware approach, the OpenAI and Gemini fallback router and the Supabase backend all run in production today, and the same architecture extends to other gendered languages.
Gallery
A look at the product across screens.
Ready to build something like Baba?
Building a translation app for a gendered language? Hebrew, Arabic, Hindi, Spanish and Russian all mark gender in ways an English sentence doesn't show. Book a call and we'll show you how we'd handle context, fallback, sync and billing.
Frequently Asked Questions
A build at Baba's launch scope typically costs $5k to $6k today and takes about two months, because AI-assisted development has cut the hand-written work. Baba took four months in 2025, built by hand. AI fees are small by comparison: roughly $0.09 to $0.82 per 1,000 short translations.
The English source carries no gender signal, so the model falls back to the commonest form, which in Hebrew is usually masculine. Explaining the rule in the prompt isn't enough, because you're asking for a fact you never supplied. Baba resolves speaker and listener in the app and writes the exact Hebrew forms into the request.
Baba's router sends the same request to Gemini, so the user gets slightly different wording instead of an error. It retries once, no backoff, because somebody is watching a loader. Set the timeout yourself: we inherited the platform default of 60 seconds, and a timeout plus a retry at that length is two minutes before anything appears.
Store the entitlement on the account, not the device. Baba verifies purchases on the server and writes one Pro status to Supabase, which both apps read at sign-in. An entitlement decided on the device can't be shared with the other platform, and any secret needed to check it would sit in the app binary.
It can. With server timestamps the phone that reconnects last wins even if its edit was older, and the other change is dropped. That's acceptable for history, because records are appended rather than edited. If users edit shared records, use per-field merges or a CRDT.
Very little. 7,500 free characters in 150-character requests generates about 19,000 input and 7,000 output tokens a month: roughly $0.005 at Flash-Lite-class prices, or $0.041 at mid-tier Flash. The system prompt is about 80% of input tokens, so shortening it saves the most.
Keep the counter in your backend and key it on the device, not the account. Baba learned this the hard way: free usage was counted against the account, and guest sessions have no account, so anyone could start a new one for a fresh allowance. The fix was a random device ID kept in the keychain, so it survives a reinstall.
Yes. The speaker and listener problem also exists in Arabic, Hindi (thak gaya / thak gayi), Spanish (cansado / cansada) and Russian (устал / устала). What changes per language is the set of forms you resolve in the app and the sentences you test with.
Let's build your next big thing
Let's build your next big thing. Share your idea and get a free consultation. We respond within one business day.












