AI productsWorking locally
Khun: live Thai–English call translation with measured guardrails
A real-time translator for calls where speakers switch between Thai and English mid-sentence, running on a laptop.
- Role
- Builder
- Period
- May to Oct 2026
- Team
- Solo, with Claude Code
- Stack
- PythonMLXSwiftWhisperGemmaResemblyzer
Receipt Verified 2026-10-09Language arbitration cut English word error rate on code-switched audio from 0.988 to 0.174, with 0 false switches.Period2026-09-24MethodFLEURS, 100 English + 100 Thai clips; paired bootstrap 95% CI on the change: -0.88 to -0.74.SourceEvaluation output (JSON)CaveatPublic benchmark clips, not real calls.English WER on code-switched audio
Receipt Verified 2026-10-09The chosen Thai model scored 0.141 character error rate on Isan dialect versus 0.475 for a generic Thai model.PeriodSep 2026Methodscb10x Isan set, n = 150 clips (22.1 min).SourceEvaluation output (JSON)Isan CER (vs 0.475)
Receipt Verified 2026-10-09Moving translation to Gemma raised chrF++ on dialect sentences from 53.10 to 61.68.Period2026-09-28MethodDialect set, n = 35; paired bootstrap, p = 0.011. In-house set (n = 100): +1.6, not significant.SourceEvaluation logtranslation gain, 95% CI 2.07 to 17.45
Goal
Translate live, code-switched Thai and English calls on a laptop, privately, without inventing words.
Obstacles
- Code-switching breaks single-language speech recognition: a Thai-pinned model turns English into noise.
- Regional dialects and phone codecs degrade accuracy.
- Speech models hallucinate during silence and get stuck in loops.
- Messaging apps bypass standard macOS audio routing.
Approach
- Native capture of both sides of a call on macOS, written in Swift, with automatic recovery when the audio stream drops.
- A Thai-specialized Whisper model running on MLX, chosen on accuracy and stability. It runs at Receipt Verified 2026-10-09The on-device MLX speech model ran at real-time factor 0.07 (CER 0.090) versus 1.15 (CER 0.156) for the next-best candidate.PeriodSep 2026MethodSame clips, same laptop.SourceEvaluation output (JSON) on a laptop.
- Language arbitration that decides, utterance by utterance, which language is being spoken.
- Hallucination guardrails chosen by A/B replay of real sessions, including rejecting a popular fix that replay showed made things worse.
- Every model swap measured with paired bootstrap confidence intervals and a minimum detectable effect.
Lift (results)
- English word error rate on code-switched audio: Receipt Verified 2026-10-09Language arbitration cut English word error rate on code-switched audio from 0.988 to 0.174, with 0 false switches.Period2026-09-24MethodFLEURS, 100 English + 100 Thai clips; paired bootstrap 95% CI on the change: -0.88 to -0.74.SourceEvaluation output (JSON)CaveatPublic benchmark clips, not real calls., with zero false switches.
- Receipt Verified 2026-10-09The chosen Thai model scored 0.141 character error rate on Isan dialect versus 0.475 for a generic Thai model.PeriodSep 2026Methodscb10x Isan set, n = 150 clips (22.1 min).SourceEvaluation output (JSON) character error rate on Isan dialect, versus 0.475 for a generic Thai model.
- Translation quality up Receipt Verified 2026-10-09Moving translation to Gemma raised chrF++ on dialect sentences from 53.10 to 61.68.Period2026-09-28MethodDialect set, n = 35; paired bootstrap, p = 0.011. In-house set (n = 100): +1.6, not significant.SourceEvaluation log on dialect sentences.
Next
- Commit and package the app behind the Khun landing page.
- A consented, human-labeled real-call test set.