Skip to content

proposal: on-device live captions (CEA-608), with measured CPU cost (early spike, Mac only) #753

Closed as not planned

Description

@chriscoveries

Proposal, with an early spike. It's weak in places, and we say where below. Our CI is in the repair shop (see our note on #699), so none of this has been through CI.

Live captions promo, with measured CPU numbers below it

The top half is an illustration, a mock-up rather than a screenshot. The chart is real: measured on an M1 Max, details below.

The idea

Live captions made entirely on the streamer's own machine: speech in, CEA-608 captions out, with no cloud service and no account. On Macs this can run on Apple's on-device speech recognizer, which barely touches the CPU (we believe the work goes to the Neural Engine, but we haven't measured that). Elsewhere, whisper.cpp is the obvious fallback.

What we've built so far

  1. A CEA-608 roll-up encoder in Rust, as draft PR rust: Add CEA-608 roll-up emitter spike (experimental) #741. It turns timed words into correctly paced 608 byte pairs. It has 11 tests, and its output decodes correctly in FFmpeg.
  2. A headless spike, outside the OBS tree. A small Swift C-ABI shim drives Apple's SpeechAnalyzer/SpeechTranscriber on a recorded clip, fed at real-time speed like a live capture. Each finalized word goes into the rust: Add CEA-608 roll-up emitter spike (experimental) #741 encoder. The 608 output is then decoded back to text and compared with a hand-checked transcript.
    • The clip is 30 s of LibriVox speech. Word error rate was 19.6% both before and after the caption step, so the 608 transport added no errors. All 9 errors came from the recognizer itself, mostly proper nouns (it heard "Abou Ben Adhem" as "Abu Benadem").
    • It ran with no permission prompts and no UI, from a file input.

Measured CPU cost

Measured on an M1 Max with the same 30 s clip, as the median of 3 runs. Process CPU time is user plus system, and it includes Apple's speech system services.

Engine Mode CPU time Average load Peak memory Word error rate
Apple SpeechTranscriber live (real-time feed) 0.44 s ~1.4% of one core 20 MiB 19.6%
whisper.cpp base.en CPU only, 4 threads 20.8 s ~3.9 cores for 5.4 s 487 MiB 30.4%
whisper.cpp base.en Metal GPU 0.74 s, plus GPU time 392 MiB 30.4%

That's about 47× less CPU than Whisper on CPU. The comparison isn't perfectly like for like: Apple was fed at live speed, while Whisper ran as fast as it could over the file. We also checked the Apple speech daemons during a live run: aned added 0.03 s of CPU and the others added none.

What's weak

  • One clip only. The accuracy numbers come from a single 30 s recording. whisper.cpp small.en did badly on it (89% WER), so we left it out of the chart.
  • Neural Engine and GPU work weren't measured, and neither was power. The CPU numbers are real, but they aren't the whole cost.
  • Not in OBS yet. There's no caption source, no audio tap from an OBS source, and no hookup to OBS's caption output. The spike reads a file.
  • The live microphone version doesn't work yet. Our last attempt stopped on a speech-model availability check.
  • Mac only, and recent macOS only, because SpeechAnalyzer is new. Windows and Linux would need whisper.cpp, which costs far more CPU (see the table) unless it runs on a GPU.
  • The spike code isn't on GitHub yet. We can push it to our fork if it's useful.

Questions for maintainers

  1. Is on-device live captioning something you'd want in obs-rust?
  2. Should captions come from a source's audio (per-source) or from the mix?
  3. Is a Swift shim acceptable for the macOS path, or would you rather it stay out of tree as a plugin?
  4. Is rust: Add CEA-608 roll-up emitter spike (experimental) #741's Rust 608 encoder the right base, or should this go through the existing libcaption path?

Activity

  1. added
    human-review-needed
    on Oct 25, 2026
  2. zackees commented on Oct 25, 2026

    @zackees
    Member

    Coordinator triage: not a Ready task yet. It asks for the maintainer's call (product direction/feature scope), which the coordinator escalates rather than decides (obs-org-coordinator §5). Labeled human-review-needed; once decided, it should be split into testable issues with acceptance criteria.

  3. moved this from Triage to Needs decision in obs-rust Multiviewon Oct 25, 2026
  4. zackees commented on Oct 25, 2026

    @zackees
    Member

    Decided: not on the roadmap for now. The project's priority is the Rust port and keeping the C API, ABI and protocols compatible, and a new user-facing feature of this size competes with that. It's a good, well-measured proposal, so it moves to Ideas: #2414. The draft PR #741 stays open as a draft, and nothing about it is rejected. If the feature is put on the roadmap later, it gets split there into Ready issues with acceptance criteria.

    (Decided by the coordinator under the maintainer's go-ahead of 2026-10-25 to settle the escalated items. The maintainer can reverse it.)

  5. removed
    human-review-needed
    on Oct 25, 2026
  6. moved this from Needs decision to Done in obs-rust Multiviewon Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions