8000 GitHub - joewongjc/type4me: MacOS/iOS 语音输入法,实时识别、大模型文本优化、全本地存储 · GitHub
[go: up one dir, main page]

Skip to content
joewongjcPublic

About

MacOS/iOS 语音输入法,实时识别、大模型文本优化、全本地存储

Resources

Contributing

Stars

1.5k stars

Watchers

3 watching

Forks

Repository files navigation

简体中文 · English

Type4Me — macOS 语音输入法:说出想法,即刻成文

最新版本 下载量 macOS 14+ MIT License

Type4Me 是一款免费开源的 macOS 语音输入法。按下快捷键说话,文字边说边出现在光标处;同一段话还可以一键润色、翻译、向 AI 提问,或者直接操作 Mac。识别引擎、大模型和 Prompt 都由你选,历史记录存在本机,随时可以导出。

下载

版本 说明 大小
✨ 云端版(推荐) Intel 与 Apple Silicon 通用。需要自备语音识别和大模型的 API Key,识别推荐火山引擎(豆包)或 Soniox。配置指引 ~18 MB
本地版 仅支持 Apple Silicon。内置 SenseVoice + Qwen3-ASR 离线识别,约占 8 GB 内存,建议 32 GB 以上的机器使用;文本处理仍需 API Key 或本地 Ollama ~720 MB

需要 macOS 14 (Sonoma) 及以上。两个版本共用一份配置,可以随时互相替换。安装包已通过 Apple 公证,首次打开按引导授予麦克风和辅助功能权限就能用。

手机版(测试中)

iPhone 上的 Type4Me 是一个语音键盘:切到 Type4Me,按住说话、松手出字,也可以使用模式拨盘、智能感知和选中纠正。识别服务、模型、模式和词汇可以在 Mac 版侧边栏的「手机版」里扫码同步过去,不用在手机上重新填 API Key。

手机版已开放 TestFlight 公开测试:在 iPhone 上打开 https://testflight.apple.com/join/57f5897s,按提示装好 TestFlight 后就能安装(需要 iOS 26)。App Store 上架情况以实际页面为准。也可以用 Xcode 自己编译安装,步骤见 iOS/README.md。

键盘:按住说话,松手出字 首页:用量与我的模式 设置:识别、模型与词汇 扫码同步 Mac 上的配置
键盘:按住说话,松手出字 首页:用量与我的模式 设置:识别、模型与词汇 扫码同步 Mac 上的配置

演示

Demo.MP4

每个模式可以绑定多个全局快捷键,每个快捷键单独设为「按住说话」或「按一下开关」;单独一个修饰键(如 fn、右 Option)还可以设为「按两下开关」,快速按两下开始,再按两下结束,单按保留系统原有功能。

内置模式 + 自由定义

模式 用途
快速模式 ⚡️仅做语音识别,速度最快
智能感知 日常主力模式,支持改口、去掉口头禅,并参考当前 App 和上下文调整措辞
翻译模式 自动翻译成18 种目标语言中的任意一种
随便问 选中屏幕上的文字,直接语音提问;支持连续追问,会话会保存下来
Mac 操作 说一句「打开 Safari」「音量调到 30」「锁屏」就能执行
语音润色 按固定规则把口语整理成书面文字,输出风格稳定
Prompt 优化 把一句需求扩写成完整的 Prompt,适合发给 ChatGPT、Claude
代办模式 结合语音、选中文字和剪贴板,直接生成可用的成品

拿不准用哪个,就用智能感知。你也可以新建模式:Prompt 模板里可以用 {text}(本次语音)、{selected}(选中的文字)、{clipboard}(剪贴板)三个变量,把任意文本处理流程绑到一个快捷键上。不方便说话的时候,按手动输入快捷键直接打字,同样可以调用这些模式。

各模式的示例和适用场景见 模式与功能详解。

功能扩展

  • 本地、云端语音识别:下载本地版,可用 SenseVoice + Qwen3-ASR 识别,完全免费;云端支持火山引擎(豆包)、Soniox、OpenAI、Groq、Mistral AI、腾讯云等 18 家服务。阶跃星辰、百炼、Gemini、ElevenLabs、Grok 和 Azure MAI 可切换实时流式或批量识别,也可接入自定义 HTTP 批量接口。
  • 大模型随意换:豆包、DeepSeek、Kimi、智谱、MiniMax、小米 MiMo、OpenAI、Claude、Gemini、OpenRouter,也可以接 Ollama、本机 Magpie 网关或任意 OpenAI 兼容接口,或通过 Codex CLI 使用本机已登录账号;兼容接口还可设置推理强度。
  • Magpie 联动插件:在 Magpie 插件市场安装社区插件「Type4Me」(或运行 magpie plugin add @magpie-community/agent-type4me),可将 Type4Me 接入 Magpie 的 Agent 页。直接复用已配置的大模型订阅与 API Key,并在两边菜单栏双向实时同步模型。
    Magpie 社区插件市场中的 Type4Me
  • 语音改口:刚输入的文字有错,按 Fn + R 说「改成下午 2 点」,只改那一处,可以一键或用语音撤销。
  • 词汇管理:热词提高专有名词的识别率,片段替换可以把「我的邮箱」换成真实地址。装上 type4me-vocab-skill 后,对 AI Agent 说一句「Qwen3.5 不要识别成 Queen 3.5」,它会帮你把词库维护好。
  • 菜单栏控制中心:在菜单栏查看录音状态,切换模式、麦克风、识别引擎、文本处理模型和翻译目标语言。
  • 录音显示按模式定制:为每种模式设置独立的录音球、录音条和提示;也可以拖动录音条到屏幕上的合适位置并吸附边缘。
  • 历史与用量:保存每次的原始识别和处理结果,支持搜索和导出 CSV;用量看板按模型统计 Token、预估费用和耗时。首页显示输入时长、字数和活跃热力图。
  • 本地备份:每天自动备份历史、模式、词汇、快捷键和配置,保留最近 7 份。
  • URL Scheme:用 type4me://toggle 等命令接入 Stream Deck、快捷指令、Raycast、Alfred 或脚本,后台调用不会抢走焦点。见 命令参考。

界面预览

首页:使用概览、活跃热力图和我的模式 随便问:选中内容直接提问
历史与大模型用量看板 外观设置:录音条实时预览

使用建议

  • 识别用云端引擎:费用很低。作者高强度用了约 5 万字(5 小时),花了 5 块钱左右,火山引擎新用户还送 40 小时。本地模型效果不错,但很吃内存,而且 SenseVoice 识别英文单词偏弱。
  • 大模型选轻量、不带思考的:整理文字用不上推理。作者自己用 Seed-2.0-lite;关不掉思考的模型(比如 MiniMax M2.7)会慢很多。如果你觉得处理慢,欢迎在 Issue 里告诉我用的是哪家、哪个模型。
  • 装上词库 Skill:专有名词识别不准,是所有语音输入法的通病。配合 Skill 用上一两天,常见的错词基本都能纠正过来。

为什么做 Type4Me

市面上的语音输入法,至少有下面一个问题:贵($30/月)、封闭(记录导不出来)、改不了(不能自定义 Prompt)、慢(强制优化加上网络延迟)。

作为某款最贵识别工具的前粉丝,我的感受一直是:「它怎么可以这么好用,又这么难用」。况且,也不是每句话都需要说得工工整整。

参与贡献

欢迎提交 Issue 和 PR。这个项目全部是我用 Claude Code 写的;收到 PR,哪怕有 bug,我也不会漏掉任何人的贡献,合并之后再改就好。

从源码构建、签名和架构说明见 CONTRIBUTING.md,设计文档从 docs/README.md 进入。想让 AI Agent 帮你从源码部署,把这个仓库的链接发给它就行。

致谢

SenseVoice · streaming-sensevoice · asr-decoder · sherpa-onnx · Qwen3-ASR · mlx-qwen3-asr

Star History

Star History Chart

许可证

MIT License



简体中文 · English

Type4Me — voice input for macOS: Say it. Shape it.

Latest release Downloads macOS 14+ MIT License

Type4Me is a free, open-source voice input app for macOS. Hold a hotkey and talk — text streams in at your cursor as you speak. The same hotkey workflow can polish what you said, translate it, ask AI about it, or turn it into a Mac action. You choose the speech engine, the LLM and the prompts; your history stays on your Mac and can be exported anytime.

Download

Edition Details Size
✨ Cloud (recommended) Intel and Apple Silicon. Bring your own speech and LLM API keys; Volcano Engine (Doubao) or Soniox recommended for recognition. Setup guide ~18 MB
Local Apple Silicon only. Bundles SenseVoice + Qwen3-ASR for offline recognition (~8 GB RAM, 32 GB+ Macs recommended). Text processing still needs an API key or local Ollama ~720 MB

Requires macOS 14 (Sonoma) or later. Both editions share the same settings, so you can switch anytime. The app is notarized by Apple; on first launch, grant Microphone and Accessibility access as prompted.

Mobile (beta)

Type4Me on iPhone is a voice keyboard: switch to it in a text field, hold to talk and let go to type. Use the mode dial, Intelli Sense and selection correction as you write. Speech services, models, modes and vocabulary sync over by scanning a QR code on the Mobile page in the Mac app's sidebar, so there are no API keys to retype.

The mobile app is in public beta on TestFlight: open https://testflight.apple.com/join/57f5897s on your iPhone and follow the prompts (iOS 26 required). Check the App Store for availability. You can also build and install it yourself with Xcode; see iOS/README.md (in Chinese).

The keyboard screenshot shows the previous layout; see the app for the 1.1.0 mode dial and recording gestures.

Keyboard: hold to talk, release to type Home: usage and your modes Settings: speech, models and vocabulary Pick what to sync from your Mac
Keyboard: hold to talk, release to type Home: usage and your modes Settings: speech, models and vocabulary Pick what to sync from your Mac

Demo

Demo.MP4

Each mode can have several global hotkeys, set individually to hold to talk or press once to toggle. A single modifier key, such as fn or Right Option, can also use press twice: tap it twice quickly to start, and twice again to stop. A single tap keeps its normal system behavior.

Built-in modes + your own

Mode What it does
Quick Mode ⚡️ Speech recognition only — the fastest path
Intelli Sense Your everyday mode: handles self-corrections, drops filler words, and adapts wording to the current app and context
Translation Translates automatically into any of 18 target languages
Ask Anything Select text anywhere and ask about it by voice; follow-ups are kept as conversations
Mac Actions "Open Safari", "Volume to 30", "Lock screen" — said and done
Voice Polish Turns speech into clean written text with a consistent, predictable style
Prompt Optimization Expands a one-line request into a well-structured prompt for ChatGPT or Claude
Task Delegation Combines your voice, the selection and the clipboard to produce a finished result

Not sure which one to use? Start with Intelli Sense. You can also create your own modes: prompt templates accept {text} (what you said), {selected} (selected text) and {clipboard}, so any text workflow can live behind one hotkey. When you can't talk, the manual input hotkey lets you type instead and still run any mode.

Examples and use cases for each mode: Modes & Features.

Extended features

  • Local and cloud recognition: the Local edition runs SenseVoice + Qwen3-ASR on your Mac, completely free; in the cloud, choose from 18 services including Volcano Engine (Doubao), Soniox, OpenAI, Groq, Mistral AI, and Tencent Cloud. StepFun, Bailian, Gemini, ElevenLabs, Grok and Azure MAI offer a choice of real-time streaming or batch recognition, and custom HTTP batch endpoints are supported too.
  • Any LLM: Doubao, DeepSeek, Kimi, Zhipu, MiniMax, Xiaomi MiMo, OpenAI, Claude, Gemini and OpenRouter, plus Ollama, the local Magpie gateway and any OpenAI-compatible endpoint. You can also use your locally signed-in account through Codex CLI. Compatible endpoints can set reasoning effort.
  • Magpie integration plugin: install the community plugin "Type4Me" from the Magpie plugin marketplace (or run magpie plugin add @magpie-community/agent-type4me) to add Type4Me to Magpie's Agents page. It lets you reuse subscriptions and API keys already configured in Magpie, with two-way real-time model syncing between both menu bars.
    Type4Me in the Magpie community plugin marketplace
  • Voice Revise: Spotted a mistake? Press Fn + R and say "make it 2 PM" — only that part changes, and you can undo by button or voice.
  • Vocabulary: hotwords improve recognition of names and jargon; snippets expand phrases like "my email" into the real address. With type4me-vocab-skill installed, tell your AI agent "don't transcribe Qwen3.5 as Queen 3.5" and it maintains your vocabulary for you.
  • Menu bar control center: see recording status and switch mode, microphone, speech engine, LLM and translation target from the menu bar.
  • Recording display per mode: choose a different orb, bar style and hints for each mode, then drag the recording bar where it works best and snap it to screen edges.
  • History & usage: every raw transcript and processed result is saved, searchable and exportable to CSV; the usage dashboard tracks tokens, estimated cost and latency per model. The home page shows time spoken, word count and an activity heatmap.
  • Local backups: history, modes, vocabulary, hotkeys and settings are snapshotted daily; the latest seven are kept.
  • URL Scheme: drive recording from Stream Deck, Shortcuts, Raycast, Alfred or scripts with commands like type4me://toggle, without stealing focus. See the command reference.

Screenshots

Home: recent dictation, usage overview and My Modes Ask Anything: voice questions with saved conversations
History and LLM usage dashboard Appearance settings with a live recording bar preview

Tips

  • Use a cloud speech engine: it's cheap. About 50,000 characters (5 hours) of heavy use cost the author roughly ¥5 (~$0.70), and Volcano Engine gives new users 40 free hours. Local models work, but 6C8E they use a lot of memory and SenseVoice is weak on English words.
  • Pick a small, non-reasoning LLM: cleaning up text doesn't need reasoning. The author uses Seed-2.0-lite; models whose thinking can't be turned off (e.g. MiniMax M2.7) are much slower. If processing feels slow, open an Issue with your provider and model.
  • Install the vocabulary Skill: every voice input tool struggles with proper nouns. After a day or two with the Skill, your recurring mistakes are fixed for good.

Why Type4Me

Every voice input tool I tried had at least one of these problems: expensive ($30/month), closed (no history export), rigid (no custom prompts), or slow (forced rewriting plus network latency).

As a former fan of the priciest one, my feeling was always: "How can it be this good and this frustrating at the same time?" And not everything you say needs to sound polished.

Contributing

Issues and PRs are welcome. I built the whole project with Claude Code, and I never drop anyone's contribution — even if a PR has bugs, we merge first and fix later.

Building from source, code signing and architecture are covered in CONTRIBUTING.md; design docs start at docs/README.md. To have an AI agent deploy from source, just give it this repository's link.

Acknowledgments

SenseVoice · streaming-sensevoice · asr-decoder · sherpa-onnx · Qwen3-ASR · mlx-qwen3-asr

License

MIT License

About

MacOS/iOS 语音输入法,实时识别、大模型文本优化、全本地存储

Resources

Contributing

Stars

1.5k stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages

0