[KongchangAI]
· 2 min read· 1,090 words

Hex: A Local-First Voice Dictation Tool Built in Rust

Hex: A Local-First Voice Dictation Tool Built in Rust

Hex is a local voice dictation tool for macOS written in Rust: hold a hotkey to speak, release to paste, fully offline.

Hex is a voice dictation tool for macOS written in Rust. Hold a global hotkey to record, then on-device recognition automatically pastes text into the focused app without internet access. It has 2,489 GitHub stars and a Linux beta. Limitations include lower accuracy than cloud models, weaker performance in noisy or specialized scenarios, Linux instability, and macOS permission barriers.

Why Do We Need Local-First Voice Dictation?

Cloud-based speech recognition services are convenient, but they always carry privacy and latency concerns. Hex chose a different path: all speech recognition is done on-device, and recordings never leave your computer. This macOS tool, written in Rust, is triggered by a global hotkey and pastes recognized text directly into the current app when you finish speaking. The project has already earned 2,489 stars on GitHub, with 172 new stars added in a single day recently — a sign that local-first voice input is gaining attention.

Hex project screenshot

Core Mechanism: Hold a Hotkey, Speak, Paste

Hex's interaction design is extremely simple. Hold down a hotkey to start recording; when you release it, the speech is transcribed into text and automatically pasted into whatever app has focus. There are no extra windows and no app switching — the whole process works like the built-in system dictation, but entirely offline.

The key to this design is "zero friction." The value of voice input lies in being faster than typing; if you had to open a separate interface and wait for a cloud response every time, the experience would suffer greatly. Hex compresses recognition and pasting into a single key operation, coming closer to the ideal of "speak and it's input."

Tech Stack: Rust and On-Device Speech Recognition

Hex is written in Rust, which brings two direct benefits: high runtime performance and memory safety. The speech recognition model runs locally without relying on network requests, so response latency is lower and unaffected by network fluctuations. For users who frequently input long passages of text, this stability is more appealing than cloud-based solutions.

On-device recognition means the model files need to be included locally. Although the original material does not disclose model size or the specific recognition engine, the "on-device speech recognition" positioning indicates that Hex has made trade-offs between accuracy and resource usage. Rust's cross-platform nature also paves the way for a Linux version — the project already offers a Linux beta.

Hex usage illustration on macOS

On-device speech recognition refers to deploying acoustic and language models directly on the user's device for execution, rather than uploading audio to a cloud server for processing. Such solutions typically rely on lightweight models that have been quantized and pruned, such as end-to-end models based on CTC or RNN-T architectures, to maintain usable accuracy under limited compute. Compared with cloud solutions, on-device recognition has the advantages of audio never leaving the local device, no network round-trip latency, and offline usability; the cost is limited model capacity and often weaker robustness in noisy environments and with domain-specific terminology. Hex has not disclosed its specific engine, but this trade-off is key to understanding its capability boundaries.

Rust's ownership model and borrow checker eliminate data races and dangling pointers at compile time, so memory safety issues are intercepted during compilation rather than causing runtime errors. For programs like speech processing that need to run for long periods and frequently allocate buffers, this can significantly reduce the risk of crashes and memory leaks. At the same time, Rust has no garbage collector, and its runtime overhead is close to C/C++, making it suitable for latency-sensitive real-time audio pipelines. Its cross-platform toolchain (cargo) and conditional compilation capabilities also make it relatively manageable for Hex to expand from macOS to Linux — this is exactly the technical foundation that enabled the project to offer a Linux beta relatively quickly.

Use Cases and Limitations

Hex is best suited for scenarios that require quickly capturing ideas, writing emails, or adding code comments. For privacy-sensitive users — such as those handling legal, medical, or business confidential content — local recognition avoids the risk of uploading audio. The developer community is also a target audience: a Rust tech stack, command-line friendliness, and open-source auditability are traits that tend to earn recognition from the technical community.

The limitations are equally obvious. On-device models are usually less accurate than large cloud models, especially in noisy environments or scenarios with many specialized terms. The Linux version is currently in beta, and its stability and feature completeness remain to be verified. In addition, macOS permission management may require users to manually grant accessibility permissions, creating a certain barrier to first-time setup.

macOS's Accessibility permission is an unavoidable hurdle for tools involving global hotkeys and automatic pasting. For security reasons, the system by default does not allow apps to listen for global keyboard events or inject keystrokes into other apps; users must manually check the authorization in "System Settings → Privacy & Security → Accessibility." In some cases, Input Monitoring permission is also required. Such authorizations may become invalid after app signature changes or major system upgrades and need to be reconfigured — this is also a major friction point in the first-use experience of such tools.

Positioning in the Open-Source Ecosystem

Hex is not the only project attempting local voice dictation, but it combines "local-first" and "minimal interaction" fairly thoroughly. 2,489 stars and 157 forks show that the community recognizes this direction, while the 172 stars gained in a single day suggest the project may have just experienced a surge in visibility. For users who want to escape cloud voice services, Hex offers an alternative worth trying.

The project adopts an open-source model, and its code is auditable — especially important for handling sensitive data such as voice. If it can continue iterating on recognition accuracy and improve Linux support, Hex has the potential to become an infrastructure-style tool for local voice input.

One-line Summary

Hex is a local voice dictation tool for macOS written in Rust: hold a hotkey to speak, release to paste, fully offline.

Paragraph Summary

Hex is a voice dictation tool for macOS written in Rust. Its core interaction is to record while holding a global hotkey, then perform on-device recognition and automatically paste into the currently focused app when released, all without an internet connection. It deploys speech recognition models locally, avoiding the privacy risks and network latency of cloud services, and is especially appealing to users handling sensitive content or frequent long-form text input. The project has earned 2,489 stars and 157 forks on GitHub, with 172 new stars in a single day recently, and it already offers a Linux beta. Its limitations are that on-device models are usually less accurate than large cloud models, performance is constrained in noisy environments and specialized terminology scenarios, the Linux version is not yet stable, and macOS permission setup also presents a barrier.

#Hex#Rust#voice dictation#local-first#macOS#on-device speech recognition#open source
Share:

Related articles