跳到正文
Hacker News (official RSS)(github.com)·· 5 小時前品質評分74

Dictate 推出 iPhone 語音輸入鍵盤,直接在手機整理文字

Show HN: Dictate, an iPhone dictation keyboard that cleans up text on-device

重點導讀

用語音打長訊息時,口頭禪和停頓常得自己刪,雲端聽寫也會把語音送到伺服器。

  • 開源專案 Dictate 是 iPhone 輸入鍵盤,會用 Apple 的語音模型轉成文字,再去掉「嗯」和結巴、整理標點與清單。
  • 內容都在手機上處理,不會送到伺服器。系統會比對整理前後的文字,若模型自行新增、刪掉或改動內容,就改回原話。整理文字的開源模型可在 App 內使用,鍵盤則使用 Apple 內建模型。測試只有一位使用者,作者也提醒這些結果只是初步檢查,不是正式基準測試。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

正文

sbo7b1jrQz6Uk4Gtvo2u7Q.mp4

Speak, and get a tidy message typed into any app on your iPhone. Everything runs on the phone: the speech is transcribed by Apple's on-device speech model, the fillers and stumbles are cleaned up by a small language model on the phone, and nothing is sent to a server.

It started as a private alternative to cloud dictation apps such as Wispr Flow, for typing long messages in Telegram and WhatsApp.

What it does

  • Dictate in the app. Tap, talk, tap. The raw transcript is copied straight away and replaced by the cleaned text a second or two later.
  • Dictate from the keyboard. A full keyboard with a microphone in the bar above it. Speak, tap ✓, and the cleaned text is typed where your cursor is. The arrow key puts back your exact words if the cleanup changed something you wanted.
  • Cleanup that keeps your words. It removes um, uh and stutters, fixes punctuation, and lays out numbered lists, bullet lists, menu paths (Settings > Privacy > Microphone) and quotes. A checker compares every cleanup with what you said and falls back to your exact words if the model added, dropped or changed anything.
  • Personal dictionary. Names the transcriber gets wrong, with what it hears instead ("GitHub", heard as "get hub").
  • History and test cases. Every dictation is kept on the phone (recordings for 7 days). Mark the ones that came out wrong as test cases and compare the cleanup models on them.

How it works

microphone ──▶ Apple SpeechAnalyzer ──▶ personal dictionary ──▶ cleanup model ──▶ checker ──▶ text
               (on-device, English)                              Qwen3.5 2B (MLX)
                                                                 or Apple's built-in model
  • Transcription: Apple's SpeechTranscriber (iOS 26), English only for now.
  • Cleanup in the app: Qwen3.5 2B in 4-bit, run on the phone's GPU with MLX Swift. It is a one-time 1.7 GB download, pinned to a fixed revision. Apple's built-in model is the fallback.
  • Cleanup in the keyboard: Apple's built-in model. iOS doesn't let a background app or a keyboard use the GPU, so the open model can't run there.
  • Why the keyboard needs the app: iOS doesn't give keyboards the microphone. The first tap of the keyboard's mic opens Dictate, which starts listening in the background. Back in your chat, the keyboard asks the app to record through a shared folder, gets the transcript back and cleans it itself. While listening is on (an hour by default, adjustable), iOS shows its orange microphone dot. Nothing is kept unless you dictate. Opening the app turns listening on too.

Measured so far

Measured on one person's dictations: 77 recordings (41 minutes) and 119 messages of up to 150 words, compared with what Wispr Flow produced for the same speech.

  • Transcription: Apple's on-device transcriber disagreed with Wispr Flow's raw transcript on about 6% of words, mostly names and spelling variants. Transcribing live gave the same result as transcribing the finished recording.
  • Cleanup: both models moved the transcript closer to Wispr Flow's cleaned text more often than further from it: Apple's model 19 closer and 1 further, Qwen3.5 2B 9 closer and 2 further. Most messages needed no change at all.
  • Formatting: 16 of 17 test cases (numbered lists, bullets, menu paths, quotes, and plain messages that must stay plain) for both models.
  • Speed on an iPhone 17: about 1.9 s for Qwen3.5 2B to clean a 40 to 50-word message in the app. From the keyboard, which uses Apple's model, about 2.5 to 3 s from tapping ✓ to the clean text being typed. Most of the cleanup time goes on the model reading the same 1,400-token prompt on every message. Caching that prompt is the next thing to try.

These are small samples from a single speaker. Treat them as a sanity check, not a benchmark.

Building it

You need a Mac with Xcode (built with 27.2; older versions untested), an iPhone on iOS 26 or later with Apple Intelligence turned on (for Apple's model), and an Apple ID. A free account works, but apps signed with it stop opening after 7 days and need Developer Mode on the phone.

brew install xcodegen
xcodebuild -downloadComponent MetalToolchain   # MLX needs it
cp Config/Signing.example.xcconfig Config/Signing.xcconfig

Edit Config/Signing.xcconfig: your team ID and a bundle prefix you own. Then:

xcodegen generate
open Dictate.xcodeproj

Run the Dictate scheme on your phone. MLX doesn't run in the simulator. Launch with -uiTestFakes there to get scripted speech and cleanup.

On the phone:

  1. Open Dictate and allow the microphone. In Settings (the gear), download the model.
  2. To use the keyboard: Settings, General, Keyboard, Keyboards, Add New Keyboard, Dictate, then turn on Allow Full Access. In any app, hold the globe key and pick Dictate.

The engine (recording state, store, cleanup checker, dictionary, keyboard link) is a Swift package with its own tests:

swift test --package-path Packages/DictationCore

Repository layout

Path What it is
App/ The SwiftUI app: recording, history, settings, model download
Keyboard/ The keyboard extension
Link/ What the app and the keyboard share (App Group folder, notifications)
Controls/, Shared/ The Control Center button and the "Start dictation" shortcut
Packages/DictationCore/ Everything that can be tested without a phone
tools/ Mac tools used to choose the transcriber, the model and the prompt

Limits

  • English only.
  • Words you take back stay in. "Friday, actually no, Thursday" comes out as you said it.
  • The keyboard has no autocorrect or swipe typing. Third-party keyboards can't use Apple's.
  • The keyboard opens the app through an undocumented route, as other dictation keyboards do. It works today, but App Review might refuse it, and a future iOS might break it.
  • Tested on one iPhone 17 only.

License

See LICENSE.

讀者討論

理性交流 · 即時討論