跳转至

实时会议转录:Apple SpeechTranscriber 对比 Moonshine

状态:建议,尚未实施。测量于 2026-10-16,在 Mac Studio(M5 Max,macOS 27.0.1)上进行。

问题

实时会议草稿是否应该改用 Apple 的 SpeechAnalyzer 配合 SpeechTranscriber(macOS 26+),同时继续让 Parakeet 滚动运行,并把最终转录作为质量校验?

测量

Kit 在 2026-10-16 的电话会议(系统音频 18.7 分钟,麦克风音频 18.3 分钟),以及一个 5.7 分钟的合成会议(say,三种声音,已知文本,1.2 秒间隔)。Apple 的数据来自一个临时 Swift 测试装置,它按 100 ms 的 Int16 缓冲区流式输入,每个音轨一个 SpeechAnalyzer,并带有 volatile 结果和音频时间范围。 Moonshine 的数据来自真实的实时工作进程 (meeting_echo_replay_tests::meeting_live_cpu)。Apple 的 CPU 数据包括承载实际工作的 localspeechrecognition XPC 服务;在没有 powermetrics 的情况下,GPU 和 Neural Engine 的开销无法归属。

CPU per second of audio, both tracks          // percent of one core
├── Apple SpeechTranscriber      ~2%    (real call at 30x: 15.7 CPU s for 1123 s
│                                        of system audio; synthetic at 1x: 7.1 s / 343 s)
├── Apple DictationTranscriber   ~8%    (90 CPU s for 1123 s; could not keep up at 30x)
├── Moonshine, spinning ORT pools  113% real call, 67% synthetic   (before this change)
└── Moonshine, single-threaded      31% real call, 17% synthetic   (after this change)

Latency after the audio, synthetic, real time
├── Apple volatile text           at once (the range ends where audio was fed)
├── Apple final segment           p50 2.3 s, p95 3.8 s after the segment ends
├── Moonshine first text          p50 0.2 s, p95 0.3 s (1 s update cadence)
└── Moonshine completed line      p50 1.0 s, p95 1.5 s after the line ends

Word error rate vs the known text, synthetic (TTS speech is easy for all)
├── Moonshine live draft   1.7%
└── Apple SpeechTranscriber 3.0%

Dictation (Parakeet, 8 s clip, 20 runs) while each runs, p50 / p95
├── Alone                         74 / 257 ms (first-run outliers)
├── Two Apple analyzers           70 / 98 ms
├── Moonshine, single-threaded    70 / 78 ms
└── Moonshine, spinning pools     70 / 108 ms

真实通话的质量未作比较:在该次运行前,录音随 Studio 的临时目录一起丢失了。

建议

作为后续工作,采用 SpeechTranscriber 作为实时草稿引擎,保留 Moonshine 作为回退,但不在回音修复中采用:

  • 它的 CPU 开销约为单线程 Moonshine 的十分之一,并且不需要选择加入的命令模型(opt-in command model),而该模型目前会完全阻塞实时草稿。
  • 它的 final 结果比 Moonshine 完成的行晚约 1.3 秒到达;其 volatile 结果在面板中覆盖了这段空档。
  • 对于会在一个 chunk 内被 Parakeet 替换的草稿来说,质量相当。
  • 在 Studio 上,无论哪个引擎在运行,听写(Dictation)都没有显示出争用。

Moonshine 的实际开销来自 ONNX Runtime 自旋的线程池,现在已通过 moonshine::run_sessions_single_threaded 禁用,因此 CPU 紧急状况不再依赖于切换引擎。

切换范围

  • 需要一个流式 Swift 桥接层:目前的 apple_speech.swift 只能转录整个缓冲区。它需要为每个音轨提供一个会话,接收音频,产出带时间范围的 volatile 和 final 结果,并在 Stop 时结束。缓冲区必须是 16 kHz 的 Int16;float 缓冲区会在 AnalyzerInput 内部触发 trap。
  • 将结果映射到 meeting_live::Event:每个 final 范围一个 line id;volatile 文本映射为 Updated,final 结果映射为 Completed;这样 live_view、回声判断和滚动覆盖无需改变。
  • 通过现有的 AppleSpeechAssetReservations 预留资源,按 locale 做可用性检查;当 SpeechTranscriber 不可用时(macOS 26 之前、不支持的语言、资源缺失)走 Moonshine 路径。
  • 在新的草稿上重新运行 meeting_echo_replay,使用一段录制的扬声器模式通话,并确认仅草稿层不差于 Moonshine。

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 hex19/hex