Qalam, dictation for how Emiratis actually speak.
Premise
Dictation is treated as a solved problem, and for speech that stays inside one language it mostly is. Complex speech is where the solving stops: sentences that move between languages, scripts, and reading directions ask a transcript to hold more than the words, and standard dictation answers with the words alone.
The sharpest instance of that speech is spoken every day in the Emirates. An Emirati sentence rarely stays in one language: it moves between Arabic and English inside a single thought, the verbs and the rhythm staying Arabic while the terms of work arrive in English, and neither half is an intrusion. Linguists call it code-switching. The Gulf has its own name for it: Arabizi (عربيزي), Arabi and Inglizi folded into one word the way the languages fold into one sentence. In the Emirates it is simply how people talk.
Text is built for one direction at a time. Arabic reads right to left, English left to right, and when one line carries both, the surface showing it picks a single base direction and forces the other language through it. The reading order breaks, punctuation lands away from its sentence, and a note that was perfectly clear spoken becomes work to read. This is the bidirectional text problem. It is demonstrable in almost any editor, and dictation inherits it in full: the words arrive accurately enough, then the box they land in undoes the way they were said.
The hard part is not hearing the words. It is rendering them the way they were said.
X-Arc works on complex speech problems as part of its applied mission, and the lab is based in the UAE, so this is the instance it lives inside. The lab could not find dictation reliable enough for daily Emirati use, so it built its own. Qalam, from قلم, the Arabic word for pen, is the answer: dictation built and benchmarked on Emirati speech, where preserving the mix is the design goal rather than the failure mode.
What Qalam is
Qalam is a dictation app built around a rendering engine. Transcription is bought, not built; what Qalam adds begins after the words arrive. Speech goes in through a browser microphone or an audio file, and text comes back reading the way it was spoken. Four stages, and the last one is the point.
Capture
A browser microphone or an audio file, in the local web UI or the terminal.
Transcribe
ElevenLabs Scribe v2 returns the raw transcript of the mixed speech.
Polish
A language model clears the debris of speech and lays the lines out by structure. Gemini 3.1 Flash-Lite by default, Claude Haiku 4.5 as the opt-in quality mode.
Render
Every line carries its own direction: Arabic lines right-aligned, English lines left-aligned, a short borrowed term riding inline in the line it belongs to.
Two polish styles ship. As Spoken, the default, keeps every word in the language it was spoken. One Language, opt-in, delivers the same note in a single language when that is what the reader needs. The script boundary holds in both directions: English stays in Latin script, Arabic stays in Arabic script, and neither is ever spelled in the other's letters.
The app runs on your machine, a local web UI or a terminal session, and makes two cloud calls with your own keys: ElevenLabs for transcription, Gemini or Claude for polish. Apache-2.0, installed straight from GitHub.
In practice
The film below walks one dictation end to end: a spoken note that moves between Arabic and English, transcribed, polished, and rendered.
The demo film could not be loaded here. The comparison below shows the moment it demonstrates.
The moment that matters is the last one. Here is the same note as text, twice.
The words are identical; only the rendering differs. In the left box, the note sits in the single left-to-right context most text surfaces give it: an Arabic-first sentence entered from the wrong edge, the English fragments breaking its flow, the final full stop stranded at the visual start of its own sentence. In the right box, Qalam has laid the note out by structure: the substantial English statement takes its own line in its own direction, the Arabic lines sit right-aligned, and the short borrowed terms ride inline where they were spoken.
Benchmark
The benchmark set is 100 clips: 92 scoreable from the Mixat-tri test split, an Emirati Arabic-English code-switching podcast corpus, and 8 further podcast clips read qualitatively. Transcription is held fixed on ElevenLabs Scribe v2, three polish models run against the same prompt, and scoring is PolyWER, a word error rate built for code-switched speech, alongside plain WER and CER. Lower is better throughout.
| Polisher | PolyWER ↓ | vs raw | Latency |
|---|---|---|---|
| raw transcriptno polish | 0.1693 | – | – |
| claude-haiku-4-5quality mode, opt-in | 0.1606 | −5.1% | 31.8 s |
| gemini-3.1-flash-liteshipped default | 0.1614 | −4.7% | 1.5 s |
| gemini-3.5-flash | 0.1640 | −3.1% | 7.2 s |
Polish helps where reading happens. Against the raw transcript, PolyWER falls 5.1% with Claude, 4.7% with Flash-Lite, and 3.1% with Flash, and character error falls 5.9% on the best run. Plain WER moves the other way, worse by 0.4% to 4.2% with polish, and the reason is worth stating plainly: the polish stage restores glyphs and punctuation and lightly rewrites, and a rewrite costs WER even when the result reads better. Both directions of that trade are published here.
The choice of default starts from what the table actually measures: the problem solved against the problem left standing. A raw transcript leaves it standing, and speed without solving the problem would be worthless, a fast answer to the wrong question. Polished, the note comes back readable, and the shipped default solves it within noise of the best score while asking 1.5 seconds for the work, a twentieth of Claude's 31.8, a trade small enough to barely register on the one stage the user actually feels. Gemini 3.1 Flash-Lite is the default; Claude Haiku 4.5 stays available as the quality mode.
The honest remainder: three rendering failure modes around dense code-switching are known and accepted as trade-offs at this stage. The bet is that preserving the code-switch exactly as spoken, and rendering it correctly, is worth more than covering every edge on day one.
Get Qalam
Qalam is open source under Apache-2.0 and installs straight from GitHub: clone the repository, run it with uv, and bring your own ElevenLabs and Gemini or Claude keys. The web UI, the terminal client, and the benchmark harness ship together.
View on GitHub →