Releases: zwcih/one-key-input
Release list
One-Key Input v0.3.0
中文 / English
本版两件大事:本地离线 ASR(音频不再出网)和智能热键模式(短按 toggle / 长按 push-to-talk)。建议所有 v0.2.x 用户升级。
Two headline features: fully offline ASR (audio never leaves the machine) and smart hotkey behavior (tap to toggle, hold to push-to-talk). Recommended for all v0.2.x users.
🇨🇳 中文
✨ 新功能
- 本地离线 ASR:sherpa-onnx + Paraformer-zh 流式识别(#12 / #14)。新增
sherpa-paraformerprovider,语音转文字完全本地跑,音频不再发送到任何云端(只有润色这一步还走 LLM)。- 引擎:sherpa-onnx v1.13.2,CMake
FetchContent拉取并校验 SHA256 - 模型路径:默认
models\paraformer-zh-streaming(exe 同目录),支持相对路径 +%LOCALAPPDATA%等环境变量展开 - Settings UI:ASR provider 下拉新增「Sherpa Paraformer (local)」,含模型目录 Browse + 线程数 + Test 按钮(不加载模型直接探测目录结构)
- 模型下载:README 给了 ModelScope(国内)和 HuggingFace 两个镜像
- 体积:portable bundle ~55 MB(不含模型),中英双语 int8 量化模型再 +~230 MB
- 引擎:sherpa-onnx v1.13.2,CMake
- 智能热键行为(#15)。新增
hotkey.behavior配置,三档可选:push_to_talk(默认,按住说话,老行为)toggle(按一下开始,再按一下结束)smart(短按 = toggle,长按超过smart_threshold_ms(默认 400ms)= push-to-talk)—— 新装用户默认这档- 配套:
Esc强制停止 /max_duration_ms(默认 5 分钟)看门狗自动结束,防止 toggle/sticky 状态忘了关 - 托盘图标真的会变色了:录音时变红(之前
Redraw()是空实现)
🐛 修复 & 改进
- 路径解析以 exe 目录为锚(C++ 引擎 + Rust Settings probe 一致),自启动 / 快捷方式 / Win+R 启动都能正确找到模型
- v0.1 / v0.2 的旧 config 升级到 v0.3 自动 backfill 新字段(
behavior默认push_to_talk,行为不变) - 未知
behavior字符串安全降级到push_to_talk并打 warning
📦 使用
下方下载 OneKeyInput-0.3.0-portable.zip(~15 MB),解压后跑 onekey-settings.exe。
- 想保持云端 ASR:什么都不用改
- 想试本地 ASR:Settings → ASR Provider 选 Sherpa Paraformer (local) → 下载模型放到
models\paraformer-zh-streaming\→ Test 按钮确认 → 保存 - 想试智能热键:Settings → Hotkey → Behavior 选 Smart
🚧 不在本版(明确范围)
- 模型自动下载器
- GPU 加速(CUDA / DirectML)
- 本地 LLM 润色
- VAD 自动停止 / 流式转写浮窗 / 自定义结束热键
🇬🇧 English
✨ New Features
- Fully offline ASR: sherpa-onnx + streaming Paraformer-zh (#12 / #14). New
sherpa-paraformerprovider runs speech-to-text entirely on-device — audio never leaves the machine; only the polish LLM still goes to the cloud.- Engine: sherpa-onnx v1.13.2, fetched via CMake
FetchContentwith pinned SHA256 - Model layout: default
models\paraformer-zh-streamingnext to the exe; supports relative paths +%LOCALAPPDATA%-style env-var expansion - Settings UI: new Sherpa Paraformer (local) option with Model-directory Browse, thread count, and a Test button that probes directory shape without loading the model
- Models: README links both ModelScope (China mirror) and HuggingFace
- Footprint: portable bundle ~55 MB without the model; the bilingual zh-en int8 model adds ~230 MB
- Engine: sherpa-onnx v1.13.2, fetched via CMake
- Smart hotkey behavior (#15). New
hotkey.behaviorconfig with three modes:push_to_talk(default for upgrades — legacy behavior preserved)toggle(tap to start, tap to stop)smart(short tap = toggle, hold pastsmart_threshold_ms(400ms) = push-to-talk) — default for fresh installs- Safety:
Escforce-stop and amax_duration_mswatchdog (default 5 min) so toggle/sticky sessions can't run away - Tray icon actually changes color now: red while recording (previous
Redraw()was a no-op)
🐛 Fixes & Improvements
- Relative model paths now anchor on the exe directory (consistent across C++ engine and Rust Settings probe) — autostart, Start-menu shortcut, and Win+R launches all resolve correctly
- v0.1 / v0.2 configs auto-backfill the new hotkey fields on upgrade (
behaviordefaults topush_to_talk, no behavior change) - Unknown
behaviorstrings safely fall back topush_to_talkwith a warning
📦 Usage
Grab OneKeyInput-0.3.0-portable.zip below, unzip, run onekey-settings.exe.
- Staying on cloud ASR: nothing to change
- Trying local ASR: Settings → ASR Provider → Sherpa Paraformer (local) → drop the model into
models\paraformer-zh-streaming\→ hit Test → Save - Trying smart hotkey: Settings → Hotkey → Behavior → Smart
🚧 Not in this release (explicit scope)
- Auto model downloader
- GPU acceleration (CUDA / DirectML)
- Local-LLM polish
- VAD auto-stop, streaming-transcript overlay, custom end-hotkey
Full Changelog: v0.2.1...v0.3.0
One-Key Input v0.2.1
中文 / English
小版本修复 + GPT-5.x 兼容。建议所有 v0.2.0 用户升级。
Minor fixes + GPT-5.x compatibility. Recommended for all v0.2.0 users.
🇨🇳 中文
🐛 修复
- 修复从 v0.1 升级到 v0.2 后 Settings 窗口空白(#6)。原因是新增的
translate字段没有被 backfill,旧 config 加载后 React 渲染崩溃。现在 load_config 后会用 defaultConfig 补齐所有缺失的 section。 - 修复润色把口述当指令直接回答的问题(#10)。比如说"how do I deploy this",模型之前会真去回答"你应该这样部署...",而不是润色成"How do I deploy this?"。现在用
<transcript>...</transcript>包装用户输入 + system prompt 明确边界,模型不再被绕进去执行口述内容。F8 翻译模式同样修复。
✨ 兼容性
- 支持 GPT-5.x reasoning 系列模型(gpt-5-mini / gpt-5 等)。这类模型在 Azure OpenAI 上禁止自定义 temperature、强制
max_completion_tokens,之前用 gpt-5-mini deployment 会 400 错误。现在:- 移除
polish.temperature配置项(润色任务对温度不敏感,靠 server 默认值更省心) - 请求体改用
max_completion_tokens(对老模型 gpt-4o-mini 也兼容)
- 移除
- 推荐切换到 GPT-5-mini:GPT-4o-mini 在 Azure 上 2026-02-27 退役,建议提前换
📦 使用
下方下载 OneKeyInput-0.2.1-portable.zip,解压后跑 onekey-settings.exe 配 Azure key。如果你之前的 deployment 是 gpt-4o-mini 一切照旧;如果想试 gpt-5-mini,直接改 deployment name 即可。
🇬🇧 English
🐛 Fixes
- Fix Settings white-screen on v0.1 → v0.2 upgrade (#6). Root cause: the new
translateconfig section wasn't backfilled, so React crashed when readingcfg.translate.enabledfrom old configs.load_confignow merges all missing sections againstdefaultConfig(). - Polish/translate no longer answers question-shaped dictations (#10). Saying "how do I deploy this" used to make the LLM actually answer the question instead of polishing it into "How do I deploy this?". User input is now wrapped in
<transcript>...</transcript>and the system prompt makes the boundary explicit. F8 translate mode fixed the same way.
✨ Compatibility
- GPT-5.x reasoning models now supported (gpt-5-mini, gpt-5, etc.). These models on Azure OpenAI reject custom
temperatureand requiremax_completion_tokensinstead ofmax_tokens— previously every polish call to a gpt-5-mini deployment 400'd. Changes:- Removed
polish.temperatureconfig field (polish quality isn't temperature-sensitive enough to justify the footgun) - Request body and connection-test probe now use
max_completion_tokens(also accepted by gpt-4o-mini, no regression)
- Removed
- Recommended: migrate to gpt-5-mini. Azure is retiring gpt-4o-mini on 2026-02-27.
📦 Download
Grab OneKeyInput-0.2.1-portable.zip below. Existing gpt-4o-mini setups keep working; to try gpt-5-mini just change the deployment name in Settings.
Full Changelog: v0.2.0...v0.2.1
One-Key Input v0.2.0
中文 / English
🇨🇳 中文
本次发布带来 翻译模式(Translation Mode),与原有的润色(口述)流程并列。
✨ 新功能
- F8 翻译模式:按住 F8(可在 Settings 里改)口述一种语言,自动翻译后注入到光标位置。复用 F9 润色相同的 Azure Speech → OpenAI 管道。
- TranslationPrompt 模块:结构化的翻译提示词,规避 Azure 内容过滤的越狱检测。
- Settings UI 翻译区:在 Tauri 设置面板新增翻译相关配置——启用开关、热键、源/目标语言、提示词覆盖。
- 润色提示词 显式要求英文技术词保持原样,告别
API、JSON等被乱译的情况。
🐛 修复
- 修复
kPromptTidy中的乱码字符(U+FFFD 替换字符)。 - 修复翻译提示词触发 Azure 内容过滤越狱检测的问题。
- 翻译配置回填复用
defaultConfig()(来自 PR #5 review)。
🛠 工程
- 新增
scripts/stage-portable.ps1,本地复现 CI 的 portable zip 打包流程,方便 dogfood 不用推 tag。 - 测试栈已就位(#1):GoogleTest(core) + Vitest(settings UI) +
cargo test(Tauri 后端)。
📦 使用
下方下载 OneKeyInput-0.2.0-portable.zip,解压到任意目录:
- 先跑
onekey-settings.exe配 Azure key、热键、目标语言 - 再跑
onekey-core.exe常驻 - 首次启动 SmartScreen 会拦截(未签名),点「仍要运行」即可
🇬🇧 English
This release introduces Translation Mode alongside the existing polish (dictation) pipeline.
✨ New features
- F8 Translation Mode — press-and-hold F8 (configurable) to dictate in one language and have the result translated and injected at the cursor. Reuses the same Azure Speech → OpenAI pipeline as F9 polish.
- TranslationPrompt module with a structured translator prompt designed to survive Azure content-filter jailbreak detection.
- Settings UI — new Translation section in the Tauri settings app: enable/disable, hotkey, source & target language, prompt overrides.
- Polish prompt now explicitly keeps English technical terms verbatim (no more mangled
API,JSON, etc.).
🐛 Fixes
- Fixed mojibake (U+FFFD replacement char) in
kPromptTidy. - Translate prompt no longer trips Azure content-filter jailbreak heuristics.
- Polish reuses
defaultConfig()for translate backfill (review feedback from #5).
🛠 Tooling
scripts/stage-portable.ps1— local equivalent of the CI portable-zip staging step, useful for dogfooding without pushing a tag.- Test stacks landed in #1: GoogleTest (core), Vitest (settings UI),
cargo test(Tauri backend).
📦 Download
Grab OneKeyInput-0.2.0-portable.zip below, unzip anywhere:
- Run
onekey-settings.exefirst to configure Azure keys, hotkeys, target language - Then run
onekey-core.exeto keep it resident - SmartScreen will block on first launch (binary is unsigned) — click "Run anyway"
Full Changelog: https://github.com/zwcih/one-key-input/commits/v0.2.0
One-Key Input v0.1.0
One-Key Input v0.1.0
第一个公开版本 / First public release.
这是什么 / What it is
按住 F9 → 说话 → 松开 → 上下文感知的 AI 润色文字 直接落到光标处。
Hold F9 → speak → release → context-aware AI-polished text typed at your cursor.
不切窗口、不复制粘贴、不打断输入流。
No window switching, no copy-paste, no interrupting your flow.
亮点 / Highlights
-
上下文感知润色 / Context-aware polish
按下热键时,Core 用 Windows UIAutomation 抓取当前前台窗口的 — 应用名、窗口标题、焦点控件、光标前后字符、同窗口其它可见文本区域 — 附加到 LLM 的 system prompt。同样一句"挺有意思的",在 YouTube 评论框、Slack 回复、代码注释里会被润成完全不同、贴合场景的句子。
When you press the hotkey, Core takes a UIAutomation snapshot of the foreground window — app, title, focused control, text around the caret, sibling text regions — and appends it to the LLM's system prompt. The same "interesting take" gets rewritten differently in a YouTube comment box, a Slack reply, or a code comment. -
零延迟设计 / Zero-latency design
上下文抓取和录音并行(800ms 预算),不增加总时长。config.json里polish.use_context: false完全关闭。
Context capture runs in parallel with recording (800ms budget) — no added latency. Setpolish.use_context: falseinconfig.jsonto disable entirely. -
后端可插拔 / Pluggable backends
ASR / LLM 都是接口化的。当前默认 Azure Speech + Azure OpenAI,OpenAI 也支持。本地 Whisper / 本地 LLM 接口已留好。
ASR and LLM are interfaces. Defaults: Azure Speech + Azure OpenAI; OpenAI works too. Local Whisper / local LLM hooks are stubbed. -
润色失败安全网 / Polish-failure safety net
LLM 调用失败时自动回落到注入原始识别结果——你不会丢字。
If polish fails, the raw transcript is injected — you never lose an utterance. -
完全 BYO Keys / Bring your own keys
没有云服务、没有遥测。所有调用直接发到你自己的 Azure / OpenAI 账号。
No server, no telemetry. All calls go directly to your own Azure / OpenAI account.
安装 / Install
下载下面的 OneKeyInput-0.1.0-portable.zip,解压到任意目录,双击 onekey-core.exe。第一次运行会弹出设置窗口让你填 key。完整说明见 README。
Download OneKeyInput-0.1.0-portable.zip below, extract anywhere, double-click onekey-core.exe. The settings window opens automatically on first run. See the README for details.
你需要 / You need
- Windows 10/11 (x64)
- Azure Speech 资源 (免费档每月 5 小时识别足够日常用 / free tier covers normal use)
- 一个 LLM endpoint:Azure OpenAI deployment(推荐 gpt-4o-mini)或 OpenAI API key
已知局限 / Known limits
- UIA 对原生 Win32 / WinUI / WPF 应用读取最佳;Electron / 浏览器内嵌内容深度依赖该应用是否暴露完整 a11y 树。专门的浏览器/IM 适配器在 v0.2 路线图。
UIA reads native Win32 / WinUI / WPF apps best; Electron and browser content depend on a11y tree exposure. Dedicated browser/IM adapters are on the v0.2 roadmap. - 仅 Windows。Linux/macOS 抽象层已铺设但未实现。
Windows only. Linux/macOS abstraction layers are stubbed.
反馈 / Feedback
- 🐛 Issues
- 💡 Discussions
- ⭐ Star if it's useful — that's how I see whether to keep building.