作者以 Rust 開發並開源本機語音聽寫工具 Hamsa
I built a fully local alternative to Wispr Flow in Rust
作者以 Rust 開發並開源 Hamsa,一款在 Windows 本機運行的語音聽寫工具,語音與文字不會上傳。Hamsa 使用以 Rust 實作的 Parakeet-TDT 語音引擎,並可透過 wgpu 使用 GPU,亦提供 CPU 運行路徑。按住 Ctrl + Win 即可聽寫並將文字貼到目前焦點所在的應用程式,亦支援免手持模式和即時預覽;目前為 Windows 10/11 beta 版。
I wanted dictation like Wispr Flow, but without the subscription and without my voice being uploaded to someone's cloud. So I built Hamsa, and it is now open source.
How it works
Hold Ctrl + Win, speak, let go, and the text is pasted into whatever app has focus. Your editor, a chat, a browser, an email, anywhere you can type. Double-tap the shortcut instead and it keeps listening hands-free: tap once to finish, Esc to cancel. While you speak, your words appear live above a small floating bar.
Everything runs on your PC
The speech engine is called Phonon, a pure Rust implementation of the Parakeet-TDT model. It runs on your GPU through wgpu when one is available, with a CPU path if not. No account, no subscription, and your voice and words are never uploaded. Your dictionary, snippets, notes and history all live on your machine.
What it can do
- Dictate anywhere, with live preview and a hands-free mode
- Dictionary: teach it the words it must spell right, plus replacements, so "hamsa dot app" becomes hamsa.app
- Snippets: say a short cue and it types a saved block of text
- Style rules: filler word removal, spoken lists become real bulleted lists, smart punctuation
- Optional smart cleanup with a small local language model, and optional Moroccan Darija speech models
- Five-step first-run setup, starts quietly with Windows in the tray, light and dark themes
Status
It is beta, Windows 10/11 only for now. Built with Rust and the Slint UI toolkit, licensed Apache 2.0.
GitHub: https://github.com/mostafadrazy/hamsa
Demo video: https://mostafadrazy.github.io/hamsa/
Feedback is very welcome, especially from people who dictate a lot. What would make you switch?
來源:DEV Community · dev.to