§ 01Context
Textbook Spanish is the wrong Spanish for a lot of people. This app teaches a specific regional dialect — its pronouns, its slang — from real material: pasted conversations, chat exports, and the language of everyday bureaucracy. Each source is translated into two languages with grammar notes and a per-turn vocabulary list that feeds a spaced-repetition dictionary. It was built for one learner first, with the community in mind.
§ 02Challenge
Four constraints pulled against each other. The translations had to be dialect-faithful, not generic. The source material is private chat data that must be anonymized before it goes anywhere. Running everything on paid frontier models gets expensive fast. And a live-captions feature had to survive hours-long audio streams without falling over.
The same features run on a paid frontier model or a free local one — and on idiomatic translation, the free one held its own.— Cost-vs-quality benchmark
§ 03The AI layer
The core design decision was to never marry the product to a single model vendor. One narrow interface (complete / completeVision) sits in front of everything, with adapters for OpenAI, Anthropic Claude and local Ollama / whisper, switched by config. Two tiers — a fast, cheap model for bulk work and a smarter one for hard cases — keep cost down. The translation call itself returns a validated JSON contract (detected language, translations, gloss, notes, extracted vocabulary), turning an LLM into a reliable typed API.
That abstraction paid off in a way we could measure. On roughly 2,000-segment broadcasts, the free local model matched or beat a paid frontier model on idiomatic translation — $0 versus about $0.54 per broadcast — so the paid key is now reserved only for the app's live path.
One interface, three providers, two tiers — the same feature runs on a paid model or a free local one.
Every translation returns a schema-validated contract with gloss, notes and extracted vocabulary — an LLM as a typed API.
Deterministic pseudonyms, PII redaction and content-hash idempotency — anonymize, then aggregate, enforced at the database.
Persist raw audio first, derive chunk numbers from disk, survive provider overloads — restart-proof by design.
§ 04Privacy & real-time
Because the corpus is real people's messages, privacy is a hard rule, not a feature. Names become deterministic salted-hash pseudonyms (stable but non-reversible), a redaction pass strips PII while preserving the linguistic content, ingest is idempotent by content hash, and only anonymized, aggregated data ever reaches the world-readable tables — enforced by Postgres row-level security.
The live-captions tool applies the same discipline to reliability: it persists raw audio before transcribing, derives the next chunk number from disk so a restart never overwrites, supports resume, and beat a known transcription repetition-loop failure mode. It transcribed a 3.75-hour stream into thousands of trilingual, section-labeled segments — recovering from a provider overload mid-run.
§ 05Result
- An AI layer that isn't locked in. Every feature runs on OpenAI, Claude or a free local model — with a real cost finding to back the choice.
- A corpus you can use safely. 1.15M real messages, anonymized and aggregated by design.
- Real-time that survives the long tail. A crash-resilient transcription tool proven on a 3.75-hour stream.
- A growth instrument built in. A monitor that tracks whether answer engines actually cite the product.
— Internal product · pre-launch; metrics above are engineering, not end-user. Building applied AI? Start a conversation.


