按下即说,语音秒变文字
基于本地 AI 的 macOS 原生语音输入工具
功能特性 • 安装方法 • 使用方法 • 项目架构 • 参与贡献
TypelessPromoV2-4K.mp4
| 功能 | 描述 |
|---|---|
| 🎤 按键说话 | 按住 Fn 键录音,松开即转文字 |
| 🔒 完全本地 | 所有模型完全在本地运行,数据不出设备 |
| 🌐 中英混合 | 双引擎均原生支持中英文混合输入 |
| ⚡ 快速轻量 | 菜单栏应用,资源占用极低 |
| 🎯 通用输入 | 任意应用可用 - 光标在哪,文字就输入到哪 |
| 💻 通用版本 | 同时支持 Apple Silicon (M1/M2/M3/M4) 和 Intel Mac |
| 要求 | 规格 |
|---|---|
| 系统 | macOS 14.0 (Sonoma) 或更高版本 |
| 芯片 | Apple Silicon (M1/M2/M3/M4) 或 Intel - 通用版本支持 |
| 内存 | 建议 8GB 以上 |
说明:Apple Silicon Mac 将利用神经网络引擎加速推理。Intel Mac 使用 CPU 推理,功能完整。
# 安装
brew tap ZhaoChaoqun/typeless && brew install --cask nano-typeless# 升级到最新版本
brew update && brew upgrade nano-typeless# 克隆仓库
git clone https://github.com/ZhaoChaoqun/nano-typeless.git
cd nano-typeless
# 用 Xcode 打开
open Typeless.xcodeproj
# 或命令行编译
xcodebuild -project Typeless.xcodeproj -scheme Typeless build首次启动需要授予两个权限:
| 权限 | 用途 | 如何开启 |
|---|---|---|
| 🎙️ 麦克风 | 录制语音 | 系统弹窗(自动) |
| ♿ 辅助功能 | 监听全局 Fn 键 |
系统设置 → 隐私与安全性 → 辅助功能 |
提示:授予辅助功能权限后,可能需要重启应用。
|
|
typeless/
├── Sources/
│ ├── TypelessApp.swift # 应用入口和生命周期
│ ├── RecordingManager.swift # 音频录制和引擎调度
│ ├── RecordingState.swift # 录音状态机管理
│ ├── ASREngine.swift # ASR 引擎统一协议
│ ├── ASRStreamRecognizing.swift # 流式识别器协议
│ ├── SherpaOnnxOnlineRecognizer.swift # Streaming Paraformer 流式识别
│ ├── QwenASRRecognizer.swift # Qwen3-ASR 流式识别
│ ├── SherpaOnnxManager.swift # 模型下载和管理
│ ├── SherpaOnnxPunctuation.swift # CT-Transformer 标点模型
│ ├── CloudRewriter.swift # 云端 LLM 文本纠错
│ ├── Qwen3TextRewriter.swift # Qwen3-0.6B 本地文本纠错
│ ├── TermNormalizer.swift # 词典后处理(术语规范化)
│ ├── KeyMonitor.swift # 全局 Fn 键检测
│ ├── TextInserter.swift # 光标文字插入
│ ├── OverlayWindow.swift # 录音 UI 遮罩
│ └── SettingsView.swift # 偏好设置 UI
├── Frameworks/
│ ├── sherpa-onnx/ # Paraformer 推理框架
│ ├── qwen-asr/ # Qwen3-ASR Rust FFI 库
│ └── qwen3-rewrite/ # Qwen3-0.6B 文本纠错 C FFI 库
├── Package.swift # Swift Package 依赖
└── Typeless.xcodeproj/ # Xcode 项目
| 组件 | 技术 |
|---|---|
| UI 框架 | SwiftUI |
| 语音识别 | sherpa-onnx (Streaming Paraformer) / Qwen3-ASR (Rust FFI) |
| 文本后处理 | Cloud LLM Rewriter / Qwen3-0.6B 本地纠错 / 词典规范化 |
| 音频采集 | AVFoundation |
| 按键监听 | CGEvent Tap API |
| 文字插入 | CGEvent(键盘模拟) |
┌─────────────┐ ┌──────────────┐ ┌─────────────┐ ┌──────────────┐
│ Fn 键 │────▶│ 录制 │────▶│ ASR 引擎 │────▶│ 插入 │
│ 监听 │ │ 音频 │ │ 转写 │ │ 文字 │
└─────────────┘ └──────────────┘ └─────────────┘ └──────────────┘
CGEvent AVFoundation 本地 AI CGEvent
应用内置两种 ASR 引擎,可在设置中切换。默认使用 Streaming Paraformer。
| 引擎 | 大小 | 模式 | 标点 | 适用场景 |
|---|---|---|---|---|
Streaming Paraformer |
~414MB(含标点模型) | 流式 | CT-Transformer | 日常使用(默认) |
Qwen3-ASR |
~834MB | 流式 | 自带标点 | 高精度,长文本 |
欢迎贡献!请随时提交 Pull Request。
- Fork 本仓库
- 创建功能分支 (
git checkout -b feature/AmazingFeature) - 提交更改 (
git commit -m 'Add some AmazingFeature') - 推送到分支 (
git push origin feature/AmazingFeature) - 提交 Pull Request
本项目基于 MIT 许可证开源 - 详见 LICENSE 文件。
Nano Typeless 的部分能力由以下子项目提供支持:
| 项目 | 说明 | 语言 |
|---|---|---|
| QwenASR | Qwen3-ASR 流式推理引擎,编译为 dylib 供本项目调用 | Rust |
| mlx-qwen-asr-streaming | Qwen3-ASR 流式推理的 MLX 实现,用于 Apple Silicon 上的快速实验 | Python |
| Qwen3-0.6B | Qwen3 0.6B 微调模型,支持 ASR 文本二阶段 rewrite(纠错+格式化) | Python |
| sherpa-onnx | sherpa-onnx fork,修复 Streaming Paraformer 流式尾部截断问题 | C++ |
- FunASR - 阿里达摩院开源语音识别模型
- sherpa-onnx - 跨平台语音识别推理框架
- Qwen3-ASR - 通义千问大模型语音识别
Press. Speak. Type.
A native macOS voice-to-text tool powered by local AI
Features • Installation • Usage • Architecture • Contributing
TypelessPromoV2-4K.mp4
| Feature | Description |
|---|---|
| 🎤 Push-to-Talk | Hold Fn key to record, release to transcribe |
| 🔒 100% Local | All models run entirely on-device, no data leaves your Mac |
| 🌐 Multilingual | Two ASR engines with native Chinese-English mixed input support |
| ⚡ Fast & Lightweight | Menu bar app with minimal resource usage |
| 🎯 Universal Input | Works in any app - just position your cursor and speak |
| 💻 Universal Binary | Runs natively on both Apple Silicon (M1/M2/M3/M4) and Intel Macs - one app, all Macs |
| Requirement | Specification |
|---|---|
| OS | macOS 14.0 (Sonoma) or later |
| Chip | Apple Silicon (M1/M2/M3/M4) or Intel - Universal Binary supported |
| RAM | 8GB+ recommended |
Note: Apple Silicon Macs will utilize the Neural Engine for faster inference. Intel Macs use CPU-based inference with full functionality.
# Install
brew tap ZhaoChaoqun/typeless && brew install --cask nano-typeless# Upgrade to latest version
brew update && brew upgrade nano-typeless# Clone the repository
git clone https://github.com/ZhaoChaoqun/nano-typeless.git
cd nano-typeless
# Open in Xcode
open Typeless.xcodeproj
# Or build via command line
xcodebuild -project Typeless.xcodeproj -scheme Typeless buildOn first launch, you'll need to grant two permissions:
| Permission | Purpose | How to Enable |
|---|---|---|
| 🎙️ Microphone | Record your voice | System Prompt (automatic) |
| ♿ Accessibility | Listen for global Fn key |
System Settings → Privacy & Security → Accessibility |
Tips: After granting Accessibility permission, you may need to restart the app.
|
|
typeless/
├── Sources/
│ ├── TypelessApp.swift # App entry & lifecycle
│ ├── RecordingManager.swift # Audio recording & engine dispatch
│ ├── RecordingState.swift # Recording state machine
│ ├── ASREngine.swift # Unified ASR engine protocol
│ ├── ASRStreamRecognizing.swift # Stream recognizer protocol
│ ├── SherpaOnnxOnlineRecognizer.swift # Streaming Paraformer
│ ├── QwenASRRecognizer.swift # Qwen3-ASR streaming recognition
│ ├── SherpaOnnxManager.swift # Model download & management
│ ├── SherpaOnnxPunctuation.swift # CT-Transformer punctuation
│ ├── CloudRewriter.swift # Cloud LLM text correction
│ ├── Qwen3TextRewriter.swift # Qwen3-0.6B local text correction
│ ├── TermNormalizer.swift # Dictionary post-processing (term normalization)
│ ├── KeyMonitor.swift # Global Fn key detection
│ ├── TextInserter.swift # Cursor text insertion
│ ├── OverlayWindow.swift # Recording UI overlay
│ └── SettingsView.swift # Preferences UI
├── Frameworks/
│ ├── sherpa-onnx/ # Paraformer inference framework
│ ├── qwen-asr/ # Qwen3-ASR Rust FFI library
│ └── qwen3-rewrite/ # Qwen3-0.6B text correction C FFI library
├── Package.swift # Swift Package dependencies
└── Typeless.xcodeproj/ # Xcode project
| Component | Technology |
|---|---|
| UI Framework | SwiftUI |
| Speech Recognition | sherpa-onnx (Streaming Paraformer) / Qwen3-ASR (Rust FFI) |
| Post-Processing | Cloud LLM Rewriter / Qwen3-0.6B local correction / Term normalization |
| Audio Capture | AVFoundation |
| Key Monitoring | CGEvent Tap API |
| Text Insertion | CGEvent (Keyboard Simulation) |
┌─────────────┐ ┌──────────────┐ ┌─────────────┐ ┌──────────────┐
│ Fn Key │────▶│ Record │────▶│ ASR Engine │────▶│ Insert │
│ Monitor │ │ Audio │ │ Transcribe │ │ Text │
└─────────────┘ └──────────────┘ └─────────────┘ └──────────────┘
CGEvent AVFoundation Local AI CGEvent
The app includes two built-in ASR engines, switchable in Settings. Default is Streaming Paraformer.
| Engine | Size | Mode | Punctuation | Best For |
|---|---|---|---|---|
Streaming Paraformer |
~414MB (incl. punct model) | Streaming | CT-Transformer | Daily use (default) |
Qwen3-ASR |
~834MB | Streaming | Built-in | High accuracy, long text |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Some capabilities of Nano Typeless are powered by these sub-projects:
| Project | Description | Language |
|---|---|---|
| QwenASR | Qwen3-ASR streaming inference engine, compiled as dylib for this project | Rust |
| mlx-qwen-asr-streaming | MLX implementation of Qwen3-ASR streaming inference for rapid prototyping on Apple Silicon | Python |
| Qwen3-0.6B | Fine-tuned Qwen3 0.6B model for two-stage ASR text rewriting (correction + formatting) | Python |
| sherpa-onnx | sherpa-onnx fork with fix for Streaming Paraformer tail truncation issue | C++ |
- FunASR - Alibaba DAMO Academy's open-source speech recognition model
- sherpa-onnx - Cross-platform speech recognition inference framework
- Qwen3-ASR - Qwen large model speech recognition
Made with ❤️ for the macOS community