跳到正文
GitHub·· 8 天前AI 评分52

Parleq 开源 macOS 语音输入工具,本地 ASR 约 64 ms 并支持六种 LLM 清理

parleq/parleq-speech

AI 导读

Parleq 是一款开源的 macOS 语音驱动文本输入工具,按住全局热键说话,处理后的文本先出现在悬浮层中,可继续用语音修改、重排或扩写,确认后粘贴回原应用。

正文

Parleq

Open-source, voice-driven text composition for macOS.

Press a global hotkey, speak, see post-processed text appear in a floating overlay. Hold the hotkey again to refine, reformat, or extend it. Accept to paste into whatever app you were using.

Status: in active personal use. The bundled Mac path (FluidAudio Parakeet TDT v3 on the Apple Neural Engine for ASR + your choice of on-device MLX cleanup, Gemini, OpenAI, Vertex AI, AWS Bedrock, or Azure OpenAI for cleanup) works end-to-end.

Requirements: macOS 14 (Sonoma) or later on Apple Silicon (M1 / M2 / M3 / M4). The binary is built arm64-only; Intel Macs can mount the DMG but won't be able to launch the app. See Supported hardware for the full capability matrix.

Website: https://parleq.app — landing page with an end-user-friendly download path. Source under web/, deployed by GitHub Actions on every push to main.

Supported hardware

Parleq requires Apple Silicon. The bundled binary is arm64-only for two independent reasons: the on-device speech model (Parakeet TDT v3) runs on the Apple Neural Engine, and the optional on-device cleanup tier runs on Apple MLX, which only targets Apple Silicon GPUs. Intel Macs can mount the DMG and drag Parleq.app to Applications, but launching it fails with macOS's Bad CPU type error (Rosetta translates Intel→ARM, not the reverse).

Tier Hardware On-device ASR On-device cleanup (MLX) Cloud cleanup
Recommended Apple Silicon (M1+), 16 GB+ ✅ ANE · ~64 ms · ~150 MB ✅ (needs 12 GB+ RAM) ✅
Supported Apple Silicon (M1+), 8 GB ✅ ANE ⚠️ below the 12 GB minimum — strongly cautioned; use cloud cleanup or skip cleanup ✅
Not supported Intel / any non-Apple-Silicon Mac ❌ app won't launch (arm64-only) ❌ ❌

Why there's no Intel build. Beyond the launch blocker, on-device ASR on Intel would fall back to CoreML on the CPU/GPU with no Neural Engine — an estimated 5–20× slower, which undercuts the low-latency core of the product — and the MLX cleanup tier can't run on Intel at all. A cloud-only x86_64 build (no bundled ASR, cleanup via a remote OpenAI-compatible asr.endpoint + a cloud LLM) would only be worth shipping for a concrete enterprise fleet that needs it. Background and the decision are in #1.

What's distinctive

  • Preview-and-refine overlay. Cleaned text appears in a floating overlay first; further voice commands edit, reformat, or extend it in a multi-turn conversation. Final accept pastes into the originally-focused app.
  • Mac-native primary. ASR runs locally on the Apple Neural Engine via FluidAudio Parakeet TDT v3 — ~64 ms transcription, ~150 MB resident, audio never leaves the device. No cold start, no provisioned GPU, no cents-per-call.
  • Pluggable LLM cleanup across six providers. On-device (Gemma 4 E4B via Apple MLX — runs in-process, no network boundary on the cleanup path, ~4 GB one-time download, ~6 GB memory while active, 12 GB+ RAM required) is the local-only option; Google Gemini (direct AI Studio API) and OpenAI (direct API) are the quick personal cloud paths; Google Vertex AI, AWS Bedrock (Claude Haiku 4.5 / GPT-OSS 120B), and Azure OpenAI are the enterprise paths. Each cloud provider supports both pasted API keys and your existing CLI session (gcloud, AWS SSO, az login). Or skip cleanup entirely and paste raw transcripts.
  • Custom dictionary. Names and terms that ASR commonly mis-transcribes (project names, proper nouns) bias both the STT pass (CTC keyword-spotting) and the LLM cleanup (smart-vocabulary hint with optional context blurbs). Each entry can list alternate spellings the ASR commonly emits — the rescorer matches against any of them but always emits the canonical term. Per-entry biasing toggle lets you skip the STT pass on terms that trigger false positives there while keeping the LLM hint. Edits apply on the next dictation, no restart.
  • App window with Recent Dictations + Stats. Hold the dictation hotkey and tap P (or pick "Show Parleq…" from the menu bar) to open the Parleq window: a sidebar with Recent Dictations (your cleaned-text history — copy back or paste-here per entry, useful when a paste landed somewhere unexpected), a Stats dashboard, Settings, and About. Recent-dictation text is memory-only, wiped on app quit, never written to disk. Only text-free per-dictation metrics persist (~/.parleq/metrics.jsonl, last 30 days) so Stats span sessions.
  • Compliance-friendly. Audio is memory-only end-to-end. Logs at ~/.parleq/app.log carry length-only diagnostics (no transcripts, no audio, no auth values). Provider API keys live in the macOS Keychain (no plaintext-on-disk fallback); CLI-session auth modes (gcloud, AWS SSO, az login) delegate token refresh to the relevant CLI cache so Parleq doesn't store long-lived cloud session tokens directly. Designed to satisfy enterprise policies that prohibit storing input data on the local computer.
  • Enterprise-deployable via MDM. IT departments can deploy Parleq fleet-wide and centrally configure provider/model selection, lock auth modes to federated (Entra ID / AWS SSO / gcloud ADC), disable optional features like image-mode references, override the Sparkle update feed to an internal mirror, and surface a Compliance Audit dialog for in-app policy verification. Reads /Library/Managed Preferences/com.parleq.app.plist — no SDK or vendor admin portal. See the Admin Guide for the deployment workflow.

Quick start

Pre-built (notarized): download the latest .dmg from github.com/parleq/parleq-speech/releases, open it, and drag Parleq.app to the Applications folder. Each release ships with a .sha256 for verification.

From source:

git clone https://github.com/parleq/parleq-speech.git
cd parleq-speech
make install
open /Applications/Parleq.app

Grant Microphone + Accessibility on first launch (both required). Hold right Option to dictate; release to clean and paste.

First launch downloads the speech model (~150 MB) — the menu-bar icon shows a download glyph until ready, typically 30–60 s on first run and under 5 s on subsequent launches. The icon switches to a microphone once the app is ready to capture.

To enable LLM cleanup, pick a provider in the first-run setup wizard or Settings → Cleanup. Google Gemini is the simplest (one API key from AI Studio); the enterprise paths (Vertex AI, AWS Bedrock, Azure OpenAI) all support your existing CLI sign-in. See parleq.app/docs for per-provider setup walkthroughs. AWS-specific operational notes are in docs/SETUP.md.

Architecture at a glance

Component What it does Where it lives
ParleqApp Hotkey listener, audio capture, overlay UI, paste, settings, setup wizard parleq-app/Sources/ParleqApp/
LocalASR In-process Parakeet TDT v3 (Apple Neural Engine) + CTC vocab boosting — no listening sockets, no separate process parleq-app/Sources/ParleqApp/LocalASR.swift
LLMProvider Provider-agnostic streaming cleanup interface — implementations for on-device MLX (LocalLLMProvider: Gemma 4 E4B, in-process, no network boundary, ~4 GB download, 12 GB+ RAM), Gemini, OpenAI, Vertex AI, Bedrock, Azure OpenAI parleq-app/Sources/ParleqApp/{LLMProvider,LLMClient,LocalLLMProvider,VertexProvider,BedrockProvider,BedrockBearerProvider,AzureOpenAIProvider}.swift
Custom dictionary User-maintained term list biasing both ASR and LLM passes ~/.parleq/config.json

A walkthrough of the four-stage pipeline (capture → transcribe → clean up → paste) is at parleq.app/how-it-works. For an enterprise security / cloudops review, docs/SECURITY_REVIEW.md is a self-contained packet covering data flows, trust boundaries, secrets management, and known limitations. A codebase guide for contributors lives at CLAUDE.md.

Project posture

  • Open-source from day one under Apache 2.0. Designed to be self-hosted, forked, modified.
  • Local-first storage. Settings, dictionary, the LLM-call ledger, and text-free per-dictation metrics live at ~/.parleq/. Audio and transcripts are never persisted.
  • Pluggable seams. ASR endpoint, LLM provider, AWS profile/region, hotkey binding, custom dictionary — all configurable. Same binary works on a personal Mac with Gemini and on a work Mac with Bedrock.

Related

  • Parleq Router — sibling library for natural-language intent routing in AI apps. Different problem space (text → intent classification); shared brand.

Acknowledgments

Parleq stands on the shoulders of several excellent open-source projects:

  • FluidAudio for the CoreML pipeline that runs Parakeet TDT v3 and the CTC keyword spotter on the Apple Neural Engine. Linked directly into the main app target since v0.9.0.
  • Soto for the Swift-native AWS SDK that powers the Bedrock cleanup path.
  • Apple's Swift open source projects — SwiftNIO, Swift Crypto, Swift Collections, and the rest of the swift-* family — for the foundation everything else builds on.

The NeMo Parakeet TDT v3 checkpoint (CoreML-converted by FluidInference and downloaded from Hugging Face on first run) is what makes private, fast on-device transcription possible at all. Thanks to NVIDIA's NeMo team for the upstream model.

A complete inventory of every third-party package, version, license, and source URL — plus the obligations they impose on redistributors — is in THIRD_PARTY_LICENSES.md. Aggregated upstream attribution lives in NOTICE.

License

Apache 2.0. See LICENSE for the full text and NOTICE for upstream attribution. A package-by-package inventory, including each dependency's license and source URL, is in THIRD_PARTY_LICENSES.md.

来源:GitHub · github.com