Skip to content

One-Key Input v0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Jun 07:13
80333fb

中文 / 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-paraformer provider,语音转文字完全本地跑,音频不再发送到任何云端(只有润色这一步还走 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
  • 智能热键行为#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-paraformer provider 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 FetchContent with pinned SHA256
    • Model layout: default models\paraformer-zh-streaming next 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
  • Smart hotkey behavior (#15). New hotkey.behavior config with three modes:
    • push_to_talk (default for upgrades — legacy behavior preserved)
    • toggle (tap to start, tap to stop)
    • smart (short tap = toggle, hold past smart_threshold_ms (400ms) = push-to-talk) — default for fresh installs
    • Safety: Esc force-stop and a max_duration_ms watchdog (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 (behavior defaults to push_to_talk, no behavior change)
  • Unknown behavior strings safely fall back to push_to_talk with 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