[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74740":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":30,"discoverSource":31},74740,"type4me","joewongjc\u002Ftype4me","joewongjc","MacOS语音输入法，实时识别、大模型文本优化、全本地存储","",null,"Swift",1259,142,2,21,0,15,33,118,45,100.97,"MIT License",false,"main",true,[],"2026-06-12 04:01:15","> 抱歉最近在忙着跨国搬家，更新频率有所下降，欢迎提 issue\u002FPR，紧急问题会尽快修。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.\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#中文\">中文\u003C\u002Fa> | \u003Ca href=\"#english\">English\u003C\u002Fa>\n\u003C\u002Fp>\n\n---\n\n# 中文\n\n> update：官方[词库管理Skill](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me-vocab-skill)，帮你大幅提高识别准确率\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fimages\u002Fheader-combined.svg\" width=\"100%\" alt=\"Type4Me - macOS 语音输入法\" \u002F>\n\u003C\u002Fp>\n\n\n- **语音识别**：内置本地识别引擎、媲美云端引擎准确率；支持多家云端引擎厂商；支持流式识别、边说边出字，说完无需等待、快速输入；\n- **文本处理**：内置润色、Prompt优化、翻译功能，可自定义添加任意处理模版（比如改人设、改语气、小语种翻译等等）；\n- **模型接入**：支持主流厂商API接入；文本处理支持使用Ollama接本地模型；\n- **词汇管理**：支持热词、映射词，2种模式。热词用于校正语音识别引擎，映射词可作为兜底或个性化场景使用（如 Web coding -> Vibe Coding, \"我的邮箱地址\" -> xxx@gmail.com）；\n- **历史记录**：存储所有历史识别记录，包括原始文本和处理后文本，支持导出CSV；\n- **配套Skill**：真正做到100%准确率，打造只属于你的输入法，[点这里安装Skill](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me-vocab-skill)后跟你的agent说\"Qwen3.5 不要识别成 Queen 3.5\"，他就能自动帮你管理热词和映射词，同类错误不再犯 \n\n## 立即体验\n\n**方式一：直接下载DMG（推荐）**\n\n两个版本，共享配置文件，可随时替换安装：  \n\n| 版本                                                         | 说明                                                         | 安装包大小   |\n| ------------------------------------------------------------ | ------------------------------------------------------------ | ------ |\n| ✨推荐：**[云端版本（点击下载）](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me\u002Freleases\u002Fdownload\u002Fv1.9.3\u002FType4Me-v1.9.3-cloud.dmg)** | 支持云端识别 (Intel + Apple Silicon)，需配置语音、大模型API Key。语音识别推荐火山-豆包语音\u002FSoniox、体验最好。火山注册有送额度，单价都十分便宜。[配置指引](https:\u002F\u002Fmy.feishu.cn\u002Fwiki\u002FQdEnwBMfUi0mN4k3ucMcNYhUnXr) | ~4MB  |\n| **[本地版本（点击下载）](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me\u002Freleases\u002Fdownload\u002Fv1.9.3\u002FType4Me-v1.9.3-local-apple-silicon.dmg)** | 内嵌 SenseVoice + Qwen3-ASR 本地识别引擎 (Apple Silicon only，约占用8GB内存，建议32GB以上)，大模型依旧需要配置API Key或Ollama本地服务。 | ~700MB |\n\n系统要求：macOS 14+ (Sonoma)\n\n\n## 界面预览\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F80b7e36d-92a4-40fb-84d6-d0b9da49bbcc\" width=\"400\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F480df251-cd5f-462f-a574-ad0f5abd328a\" width=\"400\" \u002F>\n\u003C\u002Fp>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F84a531be-b6d1-44e6-8dff-6763e9298ac1\" width=\"400\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fab2eecbb-62f1-4895-bd7c-49c138ef6da0\" width=\"400\" \u002F>\n\u003C\u002Fp>\n\n\n[查看演示视频](#演示视频)\n\n\n## 为什么做Type4Me\n\n市面上语音输入法，至少命中以下问题之一：贵（$30\u002F月）、封闭（不可导出记录）、扩展性差（不能自定义Prompt）、慢（强制优化及网络延迟）  \n\n作为某最贵识别工具曾经的粉丝，心路历程就是：**「它怎么可以这么好用，但又这么难用」**\n以及也不必所有的话都说的这么工工整整规规矩矩。\n## 使用Tips\n\n- 语音识别：\n  - 推荐使用云端模型，成本极低（我高强度用说了5w字=5小时，对应5块人民币，豆包语音注册送40小时，[配置指引](https:\u002F\u002Fmy.feishu.cn\u002Fwiki\u002FQdEnwBMfUi0mN4k3ucMcNYhUnXr)）\n  - 尽管本地模型效果还不错，但十分占用内存，内嵌Sense Voice用于流式识别（2GB内存占用）、Qwen3 ASR做校准（8GB内存占用），你也可以单独开其中一个，但体验不佳，Sense Voice中文不错、但英文单词十分拉垮。\n- 文本处理（接入LLM）：\n  - 依旧推荐使用云端模型，接入Coding Plan API，这类轻量文本处理Token消耗肉眼不可见；\n  - LLM本地跑的内存占用比语音识别还高，而且效果相比云端模型相去甚远；\n  - **不要**使用思考模式，推荐轻量模型。作者自己用的是Seed-2.0-lite。例如Minimax M2.7无法关闭思考，处理时间会非常长。对于我们这种轻量文本处理完全没有必要，牺牲体验也换不到效果。\n    - 如果你发现你的处理时间很长，请把你使用的厂商和模型告诉我，我看看代码里是否成功关闭思考（目前没有遍历测试所有API）\n- **强烈建议**搭配[配套Skill](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me-vocab-skill)使用：市面上所有的语音输入法，专有名词均无法做到很好的识别（例如：Qwen 3.5），搭配Skill使用1-2天，你将彻底迈入100%识别准确率\n\n\n\n## 详细功能介绍\n\n### 语音识别（略）\n\n### 文本处理：需配置API Key，效果受模型影响，可自行调整\u002F添加Prompt\n\n每个模式可以绑定独立的全局快捷键，支持「按住说话」和「按一下开始\u002F再按停止」两种方式。\n\n| 模式           | 说明                                                         |\n| -------------- | ------------------------------------------------------------ |\n| **快速模式**   | 实时识别出文字，识别完成即输入，零延迟                       |\n| **语音润色**   | （简单说就是类似Typeless的体验吧- -）帮你优化表达、消除口头语、纠正等 |\n| **英文翻译**   | 说中文，输出英文翻译                                         |\n| **Prompt优化** | 说一句简单的原始prompt，帮你优化后直接粘贴                   |\n| **自定义**     | 自己写 prompt，用 LLM 做任何后处理                           |\n\n#### Prompt 变量高级玩法\n\nPrompt 模板支持三种变量，让语音输入从\"听写\"升级为\"语音命令\"：\n\n| 变量          | 含义                     |\n| ------------- | ------------------------ |\n| `{text}`      | 语音识别的文字           |\n| `{selected}`  | 录音开始时光标选中的文字 |\n| `{clipboard}` | 录音开始时剪切板的内容   |\n\n**用法示例**：\n\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F4b431890-49aa-405c-b707-72ea093cfbc4\" width=\"400\" \u002F>\n\n\n### 词汇管理\n\n- **ASR 热词**：添加专有名词（如 `Claude`、`Kubernetes`），提升识别准确率\n- **片段替换**：语音说「我的邮箱」，自动替换为实际邮箱地址\n\n\n## 架构概览\n\n| 模块 | 说明 |\n|------|------|\n| `Type4Me\u002FASR\u002F` | ASR 引擎抽象层，可插拔 Provider 架构 |\n| `Type4Me\u002FAudio\u002F` | 音频采集 (16kHz mono PCM) |\n| `Type4Me\u002FSession\u002F` | 核心状态机：录音 → ASR → 注入 |\n| `Type4Me\u002FServices\u002F` | 凭证存储、热词、模型管理、Python 服务管理 |\n| `Type4Me\u002FLLM\u002F` | LLM 文本处理 (13 个 provider) |\n| `Type4Me\u002FInput\u002F` | 全局快捷键管理 |\n| `Type4Me\u002FInjection\u002F` | 文本注入 (剪贴板 Cmd+V) |\n| `Type4Me\u002FBridge\u002F` | SherpaOnnx C API Swift 桥接 (可选) |\n| `Type4Me\u002FUI\u002F` | SwiftUI 界面：浮窗 + 设置 |\n| `qwen3-asr-server\u002F` | Python Qwen3-ASR 校准服务 (Apple Silicon, MLX) |\n\nASR Provider 架构设计为可插拔：实现 `ASRProviderConfig`（定义凭证字段）和 `SpeechRecognizer`（实现识别逻辑），注册到 `ASRProviderRegistry` 即可添加新引擎。\n\n\n## 参与贡献\n\n欢迎提交 PR\u002FIssue，这个项目是我全部自己用 Claude Code 写的。\n\n对于 PR，即便有 bug\u002F代码质量不好，我最常跟 Claude 说的一句话就是不要漏了人家的贡献。你大不了合完再改。\n\n\n## 致谢\n\n- [SenseVoice](https:\u002F\u002Fgithub.com\u002FFunAudioLLM\u002FSenseVoice) - Alibaba FunAudioLLM\n- [streaming-sensevoice](https:\u002F\u002Fgithub.com\u002Fpengzhendong\u002Fstreaming-sensevoice) - @pengzhendong\n- [asr-decoder](https:\u002F\u002Fgithub.com\u002Fpengzhendong\u002Fasr-decoder) - @pengzhendong\n- [sherpa-onnx](https:\u002F\u002Fgithub.com\u002Fk2-fsa\u002Fsherpa-onnx) - k2-fsa\n- [Qwen3-ASR](https:\u002F\u002Fgithub.com\u002FQwenLM\u002FQwen3-ASR) - Alibaba Qwen\n- [mlx-qwen3-asr](https:\u002F\u002Fgithub.com\u002Fmoona3k\u002Fmlx-qwen3-asr) - @moona3k\n\n\n## 演示视频\n\n\u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fd5ad6da9-b924-4fd6-9812-d0d9868563a4\" width=\"600\" title=\"demo\" controls>demo\u003C\u002Fvideo>\n\n\n## 许可证\n\n[MIT License](LICENSE)\n\n---\n\n# English\n\n> Update: Official [Vocabulary Management Skill](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me-vocab-skill) to dramatically improve recognition accuracy\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fimages\u002Fheader-combined-en.svg\" width=\"100%\" alt=\"Type4Me - macOS Voice Input\" \u002F>\n\u003C\u002Fp>\n\n\n- **Speech Recognition**: Built-in local recognition engine with accuracy rivaling cloud engines; supports multiple cloud ASR providers; real-time streaming recognition with instant text output;\n- **Text Processing**: Built-in voice polish, prompt optimization, and translation; add any custom processing templates (persona, tone, minority language translation, etc.);\n- **Model Integration**: Supports mainstream provider APIs; text processing works with Ollama local models;\n- **Vocabulary Management**: Two modes: hotwords and snippet replacements. Hotwords improve ASR accuracy for proper nouns; snippets enable personalized substitutions (e.g., \"Web coding\" -> \"Vibe Coding\", \"my email\" -> xxx@gmail.com);\n- **History**: Stores all recognition records including raw and processed text, with CSV export;\n- **Companion Skill**: Achieve 100% recognition accuracy. [Install the Skill](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me-vocab-skill) and tell your agent \"Don't recognize Qwen3.5 as Queen 3.5\" to automatically manage hotwords and snippets. Same mistakes won't happen again.\n\n## Get Started\n\n**Option 1: Download DMG (Recommended)**\n\nTwo editions, sharing the same config files. You can switch between them at any time:\n\n| Edition | Description | Size |\n| ------- | ----------- | ---- |\n| ✨Recommended: **[Cloud Edition (Download)](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me\u002Freleases\u002Fdownload\u002Fv1.9.3\u002FType4Me-v1.9.3-cloud.dmg)** | Cloud recognition (Intel + Apple Silicon). Requires ASR and LLM API keys. Recommended: Volcano\u002FDoubao or Soniox for best experience. [Setup Guide](https:\u002F\u002Fmy.feishu.cn\u002Fwiki\u002FQdEnwBMfUi0mN4k3ucMcNYhUnXr) | ~4MB |\n| **[Local Edition (Download)](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me\u002Freleases\u002Fdownload\u002Fv1.9.3\u002FType4Me-v1.9.3-local-apple-silicon.dmg)** | Bundled SenseVoice + Qwen3-ASR local recognition (Apple Silicon only, ~8GB RAM, 32GB+ recommended). LLM still requires API key or local Ollama. | ~700MB |\n\nSystem requirements: macOS 14+ (Sonoma)\n\n**DMG shows \"damaged\" or app won't open?**\n\n> Solution:\n>\n> - Step 1: Open Terminal and run:\n>\n>   xattr -d com.apple.quarantine \u002FApplications\u002FType4Me.app\n>\n>   ```bash\n>   spctl --master-disable\n>   ```\n>\n> - Step 2: Go to System Settings > Privacy & Security > \"Allow applications from\", select \"Anywhere\"\n>\n> - Step 3: Open the DMG and drag Type4Me to the Applications folder.\n>\n> - Step 4 (Optional): Revert \"Allow applications from\" back to its previous setting.\n\n> Apple Developer certification is still pending. This is a normal macOS Gatekeeper prompt that can be resolved with the steps above.\n\n**Option 2: Give this repo link to your AI agent and let it deploy for you**\n\n## Screenshots\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F80b7e36d-92a4-40fb-84d6-d0b9da49bbcc\" width=\"400\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F480df251-cd5f-462f-a574-ad0f5abd328a\" width=\"400\" \u002F>\n\u003C\u002Fp>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F84a531be-b6d1-44e6-8dff-6763e9298ac1\" width=\"400\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fab2eecbb-62f1-4895-bd7c-49c138ef6da0\" width=\"400\" \u002F>\n\u003C\u002Fp>\n\n\n[Watch demo video](#demo-video)\n\n\n## Why Type4Me\n\nEvery voice input tool on the market hits at least one of these: expensive ($30\u002Fmonth), walled garden (can't export history), inflexible (no custom prompts), slow (forced optimization + network latency).\n\nAs 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?\"**\nAnd honestly, not everything you say needs to sound perfectly polished.\n\n## Usage Tips\n\n- Speech Recognition:\n  - Cloud models recommended. Extremely affordable (50k characters = 5 hours of heavy use costs ~$0.70 USD. Volcano\u002FDoubao gives 40 free hours on signup, [setup guide](https:\u002F\u002Fmy.feishu.cn\u002Fwiki\u002FQdEnwBMfUi0mN4k3ucMcNYhUnXr))\n  - Local models work well but are memory-intensive: SenseVoice for streaming (2GB RAM), Qwen3-ASR for calibration (8GB RAM). You can run just one, but the experience is compromised. SenseVoice handles Chinese well but struggles with English words.\n- Text Processing (LLM):\n  - Cloud models still recommended. Token cost for lightweight text processing is negligible;\n  - Running LLM locally uses more memory than ASR and the quality gap vs. cloud models is significant;\n  - **Do NOT** use reasoning\u002Fthinking mode. Use lightweight models. The author uses Seed-2.0-lite. Some models (e.g., Minimax M2.7) can't disable reasoning, resulting in very long processing times. For lightweight text processing, it's completely unnecessary.\n    - If your processing time is long, tell me which provider and model you're using so I can check if reasoning is properly disabled in the code (not all APIs have been tested)\n- **Strongly recommended**: Use with the [companion Skill](https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me-vocab-skill). No voice input tool handles proper nouns perfectly (e.g., \"Qwen 3.5\"). After 1-2 days with the Skill, you'll achieve 100% recognition accuracy.\n\n\n\n## Feature Details\n\n### Speech Recognition (See above)\n\n### Text Processing: Requires API Key. Quality depends on model choice. Prompts are fully customizable.\n\nEach mode can have its own global hotkey. Supports both \"hold to talk\" and \"press to start \u002F press to stop\".\n\n| Mode | Description |\n| ---- | ----------- |\n| **Quick Mode** | Real-time transcription, injected instantly with zero delay |\n| **Voice Polish** | (Think Typeless-style experience) Refines your expression, removes filler words, corrects errors |\n| **English Translation** | Speak Chinese, output English translation |\n| **Prompt Optimize** | Say a rough prompt, get an optimized version pasted directly |\n| **Custom** | Write your own prompt, use LLM for any post-processing |\n\n#### Advanced: Prompt Variables\n\nPrompt templates support three variables, upgrading voice input from \"dictation\" to \"voice commands\":\n\n| Variable | Description |\n| -------- | ----------- |\n| `{text}` | The recognized speech text |\n| `{selected}` | Text selected by cursor when recording started |\n| `{clipboard}` | Clipboard content when recording started |\n\n**Example**:\n\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F4b431890-49aa-405c-b707-72ea093cfbc4\" width=\"400\" \u002F>\n\n\n### Vocabulary Management\n\n- **ASR Hotwords**: Add proper nouns (e.g., `Claude`, `Kubernetes`) to improve recognition accuracy\n- **Snippet Replacement**: Say \"my email\" and it auto-replaces with your actual email address\n\n\n## Architecture Overview\n\n| Module | Description |\n|--------|-------------|\n| `Type4Me\u002FASR\u002F` | ASR engine abstraction layer, pluggable provider architecture |\n| `Type4Me\u002FAudio\u002F` | Audio capture (16kHz mono PCM) |\n| `Type4Me\u002FSession\u002F` | Core state machine: record > ASR > inject |\n| `Type4Me\u002FServices\u002F` | Credential storage, hotwords, model management, Python service management |\n| `Type4Me\u002FLLM\u002F` | LLM text processing (13 providers) |\n| `Type4Me\u002FInput\u002F` | Global hotkey management |\n| `Type4Me\u002FInjection\u002F` | Text injection (clipboard Cmd+V) |\n| `Type4Me\u002FBridge\u002F` | SherpaOnnx C API Swift bridge (optional) |\n| `Type4Me\u002FUI\u002F` | SwiftUI interface: floating window + settings |\n| `qwen3-asr-server\u002F` | Python Qwen3-ASR calibration service (Apple Silicon, MLX) |\n\nThe 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.\n\n\n## Contributing\n\nPRs and Issues are welcome. This entire project was built by the author using Claude Code.\n\nRegarding 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.\n\n\n## Acknowledgments\n\n- [SenseVoice](https:\u002F\u002Fgithub.com\u002FFunAudioLLM\u002FSenseVoice) - Alibaba FunAudioLLM\n- [streaming-sensevoice](https:\u002F\u002Fgithub.com\u002Fpengzhendong\u002Fstreaming-sensevoice) - @pengzhendong\n- [asr-decoder](https:\u002F\u002Fgithub.com\u002Fpengzhendong\u002Fasr-decoder) - @pengzhendong\n- [sherpa-onnx](https:\u002F\u002Fgithub.com\u002Fk2-fsa\u002Fsherpa-onnx) - k2-fsa\n- [Qwen3-ASR](https:\u002F\u002Fgithub.com\u002FQwenLM\u002FQwen3-ASR) - Alibaba Qwen\n- [mlx-qwen3-asr](https:\u002F\u002Fgithub.com\u002Fmoona3k\u002Fmlx-qwen3-asr) - @moona3k\n\n\n## For AI Agents\n\nIf you're an AI agent (Claude Code, Cursor, Copilot, etc.) tasked with building, deploying, or contributing to Type4Me, here's everything you need.\n\n### Read these files first\n\n1. `CLAUDE.md` - full architecture guide, credential storage, key files, development patterns, and how to add new ASR\u002FLLM providers\n2. `Package.swift` - Swift Package Manager dependencies and build targets\n3. `scripts\u002Fdeploy.sh` - the build & deploy pipeline (calls `scripts\u002Fpackage-app.sh`)\n\n### Prerequisites\n\n- macOS 14.0+ (Sonoma)\n- Xcode Command Line Tools: `xcode-select --install`\n- Python 3.12: `brew install python@3.12` (for local ASR servers)\n- CMake: `brew install cmake` (only if building SherpaOnnx punctuation engine)\n\n### Build & deploy\n\n```bash\n# 1. Clone\ngit clone https:\u002F\u002Fgithub.com\u002Fjoewongjc\u002Ftype4me.git && cd type4me\n\n# 2. (Optional) Build SherpaOnnx punctuation engine (~5 min, needs cmake)\nbash scripts\u002Fbuild-sherpa.sh\n\n# 3. (Optional) Setup Qwen3-ASR server (needs python3.12, Apple Silicon only)\ncd qwen3-asr-server && python3.12 -m venv .venv && source .venv\u002Fbin\u002Factivate && pip install -r requirements.txt && cd ..\n\n# 4. Deploy (builds, bundles .app, signs, installs to \u002FApplications, launches)\nbash scripts\u002Fdeploy.sh\n\n# Subsequent updates\ngit pull && bash scripts\u002Fdeploy.sh\n```\n\nSteps 2-3 are optional. Skipping them disables local ASR, but cloud ASR works fine.\n\n### Code signing & permissions\n\n`deploy.sh` handles code signing automatically to **preserve macOS permissions across rebuilds**:\n\n- **First deploy** auto-creates a self-signed certificate (\"Type4Me Local\", valid 10 years) if no signing identity exists. This may trigger a **Keychain password prompt** that requires human interaction.\n- **Subsequent deploys** reuse the same certificate. Accessibility\u002FMicrophone permissions persist, no re-grant needed.\n- After first launch, the user must grant **Accessibility permission** once (System Settings > Privacy & Security > Accessibility > enable Type4Me).\n- To override signing identity: `CODESIGN_IDENTITY=\"Your Cert\" bash scripts\u002Fdeploy.sh`\n- Fallback to ad-hoc signing: `CODESIGN_IDENTITY=\"-\" bash scripts\u002Fdeploy.sh` (Accessibility permission will reset each build)\n\n### Key architecture points\n\n- **Swift Package Manager** project, no `.xcodeproj` needed\n- **Local ASR**: dual-engine design. SenseVoice (streaming partial results) + Qwen3-ASR (final calibration via MLX\u002FMetal). Both run as Python WebSocket servers managed by `SenseVoiceServerManager`\n- **Cloud ASR**: 7 providers implemented (Volcano, OpenAI, Deepgram, AssemblyAI, Soniox, Bailian, Baidu)\n- **Credentials**: stored at `~\u002FLibrary\u002FApplication Support\u002FType4Me\u002Fcredentials.json` (mode 0600), never in code or environment variables. GUI apps cannot read shell env vars from `~\u002F.zshrc`\n- **ASR provider architecture**: plugin-based. To add a new provider: implement `ASRProviderConfig` + `SpeechRecognizer` protocol, register in `ASRProviderRegistry.all`. See `CLAUDE.md` for details\n- **Audio format**: 16kHz mono PCM16-LE, 200ms chunks (6400 bytes)\n- **Text injection**: clipboard-based Cmd+V paste with save\u002Frestore\n\n\n## Demo Video\n\n\u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fd5ad6da9-b924-4fd6-9812-d0d9868563a4\" width=\"600\" title=\"demo\" controls>demo\u003C\u002Fvideo>\n\n\n## Star History\n\n\u003Ca href=\"https:\u002F\u002Fstar-history.com\u002F#joewongjc\u002Ftype4me&Date\">\n \u003Cpicture>\n   \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=joewongjc\u002Ftype4me&type=Date&theme=dark\" \u002F>\n   \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=joewongjc\u002Ftype4me&type=Date\" \u002F>\n   \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=joewongjc\u002Ftype4me&type=Date\" \u002F>\n \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n## License\n\n[MIT License](LICENSE)\n","Type4Me 是一款专为 macOS 设计的语音输入法，支持实时识别、文本优化和全本地存储。其核心功能包括内置本地及云端语音识别引擎，提供媲美云端引擎的准确率，并支持流式识别；内置润色、Prompt 优化和翻译等文本处理功能，可自定义处理模板；支持主流厂商API接入以及Ollama本地模型；具备热词和映射词管理功能以提高识别准确率；所有历史记录均存储于本地并支持导出CSV。此外，还提供配套Skill进一步提升个性化体验。该工具特别适合需要高效、准确且私密性强的语音输入场景，如写作、编程或日常办公。","2026-06-11 03:50:36","high_star"]