抱歉最近在忙着跨国搬家,更新频率有所下降,欢迎提 issue/PR,紧急问题会尽快修。Sorry, I've been busy with an international move lately, so updates have slowed down — issues and PRs welcome, urgent ones will be fixed ASAP.
update:官方词库管理Skill,帮你大幅提高识别准确率
方式一:直接下载DMG(推荐)
两个版本,共享配置文件,可随时替换安装:
| 版本 | 说明 | 安装包大小 |
|---|---|---|
| ✨推荐:云端版本(点击下载) | 支持云端识别 (Intel + Apple Silicon),需配置语音、大模型API Key。语音识别推荐火山-豆包语音/Soniox、体验最好。火山注册有送额度,单价都十分便宜。配置指引 | ~4MB |
| 本地版本(点击下载) | 内嵌 SenseVoice + Qwen3-ASR 本地识别引擎 (Apple Silicon only,约占用8GB内存,建议32GB以上),大模型依旧需要配置API Key或Ollama本地服务。 | ~700MB |
系统要求:macOS 14+ (Sonoma)
市面上语音输入法,至少命中以下问题之一:贵($30/月)、封闭(不可导出记录)、扩展性差(不能自定义Prompt)、慢(强制优化及网络延迟)
作为某最贵识别工具曾经的粉丝,心路历程就是:「它怎么可以这么好用,但又这么难用」 以及也不必所有的话都说的这么工工整整规规矩矩。
每个模式可以绑定独立的全局快捷键,支持「按住说话」和「按一下开始/再按停止」两种方式。
| 模式 | 说明 |
|---|---|
| 快速模式 | 实时识别出文字,识别完成即输入,零延迟 |
| 语音润色 | (简单说就是类似Typeless的体验吧- -)帮你优化表达、消除口头语、纠正等 |
| 英文翻译 | 说中文,输出英文翻译 |
| Prompt优化 | 说一句简单的原始prompt,帮你优化后直接粘贴 |
| 自定义 | 自己写 prompt,用 LLM 做任何后处理 |
Prompt 模板支持三种变量,让语音输入从"听写"升级为"语音命令":
| 变量 | 含义 |
|---|---|
{text} | 语音识别的文字 |
{selected} | 录音开始时光标选中的文字 |
{clipboard} | 录音开始时剪切板的内容 |
用法示例:
Claude、Kubernetes),提升识别准确率| 模块 | 说明 |
|---|---|
Type4Me/ASR/ | ASR 引擎抽象层,可插拔 Provider 架构 |
Type4Me/Audio/ | 音频采集 (16kHz mono PCM) |
Type4Me/Session/ | 核心状态机:录音 → ASR → 注入 |
Type4Me/Services/ | 凭证存储、热词、模型管理、Python 服务管理 |
Type4Me/LLM/ | LLM 文本处理 (13 个 provider) |
Type4Me/Input/ | 全局快捷键管理 |
Type4Me/Injection/ | 文本注入 (剪贴板 Cmd+V) |
Type4Me/Bridge/ | SherpaOnnx C API Swift 桥接 (可选) |
Type4Me/UI/ | SwiftUI 界面:浮窗 + 设置 |
qwen3-asr-server/ | Python Qwen3-ASR 校准服务 (Apple Silicon, MLX) |
ASR Provider 架构设计为可插拔:实现 ASRProviderConfig(定义凭证字段)和 SpeechRecognizer(实现识别逻辑),注册到 ASRProviderRegistry 即可添加新引擎。
欢迎提交 PR/Issue,这个项目是我全部自己用 Claude Code 写的。
对于 PR,即便有 bug/代码质量不好,我最常跟 Claude 说的一句话就是不要漏了人家的贡献。你大不了合完再改。
demo
Update: Official Vocabulary Management Skill to dramatically improve recognition accuracy
Option 1: Download DMG (Recommended)
Two editions, sharing the same config files. You can switch between them at any time:
| Edition | Description | Size |
|---|---|---|
| ✨Recommended: Cloud Edition (Download) | Cloud recognition (Intel + Apple Silicon). Requires ASR and LLM API keys. Recommended: Volcano/Doubao or Soniox for best experience. Setup Guide | ~4MB |
| Local Edition (Download) | Bundled SenseVoice + Qwen3-ASR local recognition (Apple Silicon only, ~8GB RAM, 32GB+ recommended). LLM still requires API key or local Ollama. | ~700MB |
System requirements: macOS 14+ (Sonoma)
DMG shows "damaged" or app won't open?
Solution:
Step 1: Open Terminal and run:
xattr -d com.apple.quarantine /Applications/Type4Me.app
spctl --master-disableStep 2: Go to System Settings > Privacy & Security > "Allow applications from", select "Anywhere"
Step 3: Open the DMG and drag Type4Me to the Applications folder.
Step 4 (Optional): Revert "Allow applications from" back to its previous setting.
Apple Developer certification is still pending. This is a normal macOS Gatekeeper prompt that can be resolved with the steps above.
Option 2: Give this repo link to your AI agent and let it deploy for you
Every voice input tool on the market hits at least one of these: expensive ($30/month), walled garden (can't export history), inflexible (no custom prompts), slow (forced optimization + network latency).
As a former fan of the most expensive transcription tool out there, the journey was: "How can it be this good and this frustrating at the same time?" And honestly, not everything you say needs to sound perfectly polished.
Each mode can have its own global hotkey. Supports both "hold to talk" and "press to start / press to stop".
| Mode | Description |
|---|---|
| Quick Mode | Real-time transcription, injected instantly with zero delay |
| Voice Polish | (Think Typeless-style experience) Refines your expression, removes filler words, corrects errors |
| English Translation | Speak Chinese, output English translation |
| Prompt Optimize | Say a rough prompt, get an optimized version pasted directly |
| Custom | Write your own prompt, use LLM for any post-processing |
Prompt templates support three variables, upgrading voice input from "dictation" to "voice commands":
| Variable | Description |
|---|---|
{text} | The recognized speech text |
{selected} | Text selected by cursor when recording started |
{clipboard} | Clipboard content when recording started |
Example:
Claude, Kubernetes) to improve recognition accuracy| Module | Description |
|---|---|
Type4Me/ASR/ | ASR engine abstraction layer, pluggable provider architecture |
Type4Me/Audio/ | Audio capture (16kHz mono PCM) |
Type4Me/Session/ | Core state machine: record > ASR > inject |
Type4Me/Services/ | Credential storage, hotwords, model management, Python service management |
Type4Me/LLM/ | LLM text processing (13 providers) |
Type4Me/Input/ | Global hotkey management |
Type4Me/Injection/ | Text injection (clipboard Cmd+V) |
Type4Me/Bridge/ | SherpaOnnx C API Swift bridge (optional) |
Type4Me/UI/ | SwiftUI interface: floating window + settings |
qwen3-asr-server/ | Python Qwen3-ASR calibration service (Apple Silicon, MLX) |
The ASR provider architecture is fully pluggable: implement ASRProviderConfig (define credential fields) and SpeechRecognizer (implement recognition logic), register with ASRProviderRegistry, and you have a new engine.
PRs and Issues are welcome. This entire project was built by the author using Claude Code.
Regarding PRs: even if there are bugs or code quality issues, the number one rule is to never drop anyone's contribution. You can always fix things after merging.
If you're an AI agent (Claude Code, Cursor, Copilot, etc.) tasked with building, deploying, or contributing to Type4Me, here's everything you need.
CLAUDE.md - full architecture guide, credential storage, key files, development patterns, and how to add new ASR/LLM providersPackage.swift - Swift Package Manager dependencies and build targetsscripts/deploy.sh - the build & deploy pipeline (calls scripts/package-app.sh)xcode-select --installbrew install python@3.12 (for local ASR servers)brew install cmake (only if building SherpaOnnx punctuation engine)# 1. Clone
git clone https://github.com/joewongjc/type4me.git && cd type4me
# 2. (Optional) Build SherpaOnnx punctuation engine (~5 min, needs cmake)
bash scripts/build-sherpa.sh
# 3. (Optional) Setup Qwen3-ASR server (needs python3.12, Apple Silicon only)
cd qwen3-asr-server && python3.12 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt && cd ..
# 4. Deploy (builds, bundles .app, signs, installs to /Applications, launches)
bash scripts/deploy.sh
# Subsequent updates
git pull && bash scripts/deploy.sh
Steps 2-3 are optional. Skipping them disables local ASR, but cloud ASR works fine.
deploy.sh handles code signing automatically to preserve macOS permissions across rebuilds:
CODESIGN_IDENTITY="Your Cert" bash scripts/deploy.shCODESIGN_IDENTITY="-" bash scripts/deploy.sh (Accessibility permission will reset each build).xcodeproj neededSenseVoiceServerManager~/Library/Application Support/Type4Me/credentials.json (mode 0600), never in code or environment variables. GUI apps cannot read shell env vars from ~/.zshrcASRProviderConfig + SpeechRecognizer protocol, register in ASRProviderRegistry.all. See CLAUDE.md for detailsdemo
Swift
55.2%
HTML
23.5%
Python
10.6%
C
8.3%
Shell
1.8%
抱歉最近在忙着跨国搬家,更新频率有所下降,欢迎提 issue/PR,紧急问题会尽快修。Sorry, I've been busy with an international move lately, so updates have slowed down — issues and PRs welcome, urgent ones will be fixed ASAP.
update:官方词库管理Skill,帮你大幅提高识别准确率
方式一:直接下载DMG(推荐)
两个版本,共享配置文件,可随时替换安装:
| 版本 | 说明 | 安装包大小 |
|---|---|---|
| ✨推荐:云端版本(点击下载) | 支持云端识别 (Intel + Apple Silicon),需配置语音、大模型API Key。语音识别推荐火山-豆包语音/Soniox、体验最好。火山注册有送额度,单价都十分便宜。配置指引 | ~4MB |
| 本地版本(点击下载) | 内嵌 SenseVoice + Qwen3-ASR 本地识别引擎 (Apple Silicon only,约占用8GB内存,建议32GB以上),大模型依旧需要配置API Key或Ollama本地服务。 | ~700MB |
系统要求:macOS 14+ (Sonoma)
市面上语音输入法,至少命中以下问题之一:贵($30/月)、封闭(不可导出记录)、扩展性差(不能自定义Prompt)、慢(强制优化及网络延迟)
作为某最贵识别工具曾经的粉丝,心路历程就是:「它怎么可以这么好用,但又这么难用」 以及也不必所有的话都说的这么工工整整规规矩矩。
每个模式可以绑定独立的全局快捷键,支持「按住说话」和「按一下开始/再按停止」两种方式。
| 模式 | 说明 |
|---|---|
| 快速模式 | 实时识别出文字,识别完成即输入,零延迟 |
| 语音润色 | (简单说就是类似Typeless的体验吧- -)帮你优化表达、消除口头语、纠正等 |
| 英文翻译 | 说中文,输出英文翻译 |
| Prompt优化 | 说一句简单的原始prompt,帮你优化后直接粘贴 |
| 自定义 | 自己写 prompt,用 LLM 做任何后处理 |
Prompt 模板支持三种变量,让语音输入从"听写"升级为"语音命令":
| 变量 | 含义 |
|---|---|
{text} | 语音识别的文字 |
{selected} | 录音开始时光标选中的文字 |
{clipboard} | 录音开始时剪切板的内容 |
用法示例:
Claude、Kubernetes),提升识别准确率| 模块 | 说明 |
|---|---|
Type4Me/ASR/ | ASR 引擎抽象层,可插拔 Provider 架构 |
Type4Me/Audio/ | 音频采集 (16kHz mono PCM) |
Type4Me/Session/ | 核心状态机:录音 → ASR → 注入 |
Type4Me/Services/ | 凭证存储、热词、模型管理、Python 服务管理 |
Type4Me/LLM/ | LLM 文本处理 (13 个 provider) |
Type4Me/Input/ | 全局快捷键管理 |
Type4Me/Injection/ | 文本注入 (剪贴板 Cmd+V) |
Type4Me/Bridge/ | SherpaOnnx C API Swift 桥接 (可选) |
Type4Me/UI/ | SwiftUI 界面:浮窗 + 设置 |
qwen3-asr-server/ | Python Qwen3-ASR 校准服务 (Apple Silicon, MLX) |
ASR Provider 架构设计为可插拔:实现 ASRProviderConfig(定义凭证字段)和 SpeechRecognizer(实现识别逻辑),注册到 ASRProviderRegistry 即可添加新引擎。
欢迎提交 PR/Issue,这个项目是我全部自己用 Claude Code 写的。
对于 PR,即便有 bug/代码质量不好,我最常跟 Claude 说的一句话就是不要漏了人家的贡献。你大不了合完再改。
demo
Update: Official Vocabulary Management Skill to dramatically improve recognition accuracy
Option 1: Download DMG (Recommended)
Two editions, sharing the same config files. You can switch between them at any time:
| Edition | Description | Size |
|---|---|---|
| ✨Recommended: Cloud Edition (Download) | Cloud recognition (Intel + Apple Silicon). Requires ASR and LLM API keys. Recommended: Volcano/Doubao or Soniox for best experience. Setup Guide | ~4MB |
| Local Edition (Download) | Bundled SenseVoice + Qwen3-ASR local recognition (Apple Silicon only, ~8GB RAM, 32GB+ recommended). LLM still requires API key or local Ollama. | ~700MB |
System requirements: macOS 14+ (Sonoma)
DMG shows "damaged" or app won't open?
Solution:
Step 1: Open Terminal and run:
xattr -d com.apple.quarantine /Applications/Type4Me.app
spctl --master-disableStep 2: Go to System Settings > Privacy & Security > "Allow applications from", select "Anywhere"
Step 3: Open the DMG and drag Type4Me to the Applications folder.
Step 4 (Optional): Revert "Allow applications from" back to its previous setting.
Apple Developer certification is still pending. This is a normal macOS Gatekeeper prompt that can be resolved with the steps above.
Option 2: Give this repo link to your AI agent and let it deploy for you
Every voice input tool on the market hits at least one of these: expensive ($30/month), walled garden (can't export history), inflexible (no custom prompts), slow (forced optimization + network latency).
As a former fan of the most expensive transcription tool out there, the journey was: "How can it be this good and this frustrating at the same time?" And honestly, not everything you say needs to sound perfectly polished.
Each mode can have its own global hotkey. Supports both "hold to talk" and "press to start / press to stop".
| Mode | Description |
|---|---|
| Quick Mode | Real-time transcription, injected instantly with zero delay |
| Voice Polish | (Think Typeless-style experience) Refines your expression, removes filler words, corrects errors |
| English Translation | Speak Chinese, output English translation |
| Prompt Optimize | Say a rough prompt, get an optimized version pasted directly |
| Custom | Write your own prompt, use LLM for any post-processing |
Prompt templates support three variables, upgrading voice input from "dictation" to "voice commands":
| Variable | Description |
|---|---|
{text} | The recognized speech text |
{selected} | Text selected by cursor when recording started |
{clipboard} | Clipboard content when recording started |
Example:
Claude, Kubernetes) to improve recognition accuracy| Module | Description |
|---|---|
Type4Me/ASR/ | ASR engine abstraction layer, pluggable provider architecture |
Type4Me/Audio/ | Audio capture (16kHz mono PCM) |
Type4Me/Session/ | Core state machine: record > ASR > inject |
Type4Me/Services/ | Credential storage, hotwords, model management, Python service management |
Type4Me/LLM/ | LLM text processing (13 providers) |
Type4Me/Input/ | Global hotkey management |
Type4Me/Injection/ | Text injection (clipboard Cmd+V) |
Type4Me/Bridge/ | SherpaOnnx C API Swift bridge (optional) |
Type4Me/UI/ | SwiftUI interface: floating window + settings |
qwen3-asr-server/ | Python Qwen3-ASR calibration service (Apple Silicon, MLX) |
The ASR provider architecture is fully pluggable: implement ASRProviderConfig (define credential fields) and SpeechRecognizer (implement recognition logic), register with ASRProviderRegistry, and you have a new engine.
PRs and Issues are welcome. This entire project was built by the author using Claude Code.
Regarding PRs: even if there are bugs or code quality issues, the number one rule is to never drop anyone's contribution. You can always fix things after merging.
If you're an AI agent (Claude Code, Cursor, Copilot, etc.) tasked with building, deploying, or contributing to Type4Me, here's everything you need.
CLAUDE.md - full architecture guide, credential storage, key files, development patterns, and how to add new ASR/LLM providersPackage.swift - Swift Package Manager dependencies and build targetsscripts/deploy.sh - the build & deploy pipeline (calls scripts/package-app.sh)xcode-select --installbrew install python@3.12 (for local ASR servers)brew install cmake (only if building SherpaOnnx punctuation engine)# 1. Clone
git clone https://github.com/joewongjc/type4me.git && cd type4me
# 2. (Optional) Build SherpaOnnx punctuation engine (~5 min, needs cmake)
bash scripts/build-sherpa.sh
# 3. (Optional) Setup Qwen3-ASR server (needs python3.12, Apple Silicon only)
cd qwen3-asr-server && python3.12 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt && cd ..
# 4. Deploy (builds, bundles .app, signs, installs to /Applications, launches)
bash scripts/deploy.sh
# Subsequent updates
git pull && bash scripts/deploy.sh
Steps 2-3 are optional. Skipping them disables local ASR, but cloud ASR works fine.
deploy.sh handles code signing automatically to preserve macOS permissions across rebuilds:
CODESIGN_IDENTITY="Your Cert" bash scripts/deploy.shCODESIGN_IDENTITY="-" bash scripts/deploy.sh (Accessibility permission will reset each build).xcodeproj neededSenseVoiceServerManager~/Library/Application Support/Type4Me/credentials.json (mode 0600), never in code or environment variables. GUI apps cannot read shell env vars from ~/.zshrcASRProviderConfig + SpeechRecognizer protocol, register in ASRProviderRegistry.all. See CLAUDE.md for detailsdemo
Swift
55.2%
HTML
23.5%
Python
10.6%
C
8.3%
Shell
1.8%