A tiny native macOS app that turns a video (or audio) file into a text transcript. Pick a file, choose a backend, press Transcribe, then Copy or Save the result.
Built with the Native SDK: the whole app is
src/core.ts (Model / Msg / update — the app-core subset, compiled to
native at build time, no JS runtime in the binary) and src/app.native
(the view). No Electron, no WebView.
The transcript is shown one segment per line with [m:ss] timestamps;
a Show timestamps toggle hides/shows them instantly (no
re-transcription). Transcription starts automatically when you pick a
file; Re-transcribe re-runs after you switch backends.
| Backend | How it works | Needs |
|---|---|---|
| xAI STT (cloud, BYOK) | Uploads the file to https://api.x.ai/v1/stt (accepts MP4/MKV/M4A/MOV/WAV/… directly, ≤ 500 MB) |
XAI_API_KEY in the environment + network |
| Local (default) | ffmpeg extracts 16 kHz mono WAV, then local-ai-cli's transcribe (whisper.cpp) runs offline |
ffmpeg + local-ai-cli installed |
The backend switch is top-right. Provide the xAI key either way:
- In-app: switch on "Use xAI cloud" and paste your key into the field —
it's saved to your macOS Keychain (service
video-transcribe-xai) and reloaded on every launch. - Env: export
XAI_API_KEYbefore launching (takes precedence).
The key is handed to security and curl over stdin (never on any
process's argv, so it stays out of ps); it is never written to disk in
plaintext or baked into the binary. Turn the switch off to transcribe
fully locally with no key.
Both paths are driven by one inline /bin/sh helper spawned via the
SDK's Cmd.spawn effect — the app itself performs no network or file
work outside that effect.
- macOS (Apple Silicon), the Native SDK CLI (
native). - Local backend:
ffmpeg(brew install ffmpeg) andlocal-ai-cli(transcribeon PATH — see its repo). Uses whisperlarge-v3-turbo. - xAI backend:
XAI_API_KEYexported in the shell that launches the app.
native check # verify core.ts (subset checker) + markup + app.zon
native dev # build a Debug binary and open the window (markup hot reload)
native build # ReleaseFast binary -> zig-out/bin/video-transcribe-macLaunch with the key for the cloud backend:
XAI_API_KEY=xai-... native dev- Transcript length: the helper's stdout is collected up to 512 KiB (~85k words). Longer transcripts truncate — fine for typical clips, not for multi-hour files. (Upgrade path: stream to a temp file and read it back in chunks.)
- Language: the xAI path pins
language=en(required whenformat=true). Make it a picker if you need other languages. - The Native SDK is pre-1.0; APIs may move between releases.