Repository navigation
mac-captions: add on-device live captions filter - #84
Draft
chriscoveries wants to merge 4 commits into
Draft
chriscoveries wants to merge 4 commits into
chriscoveries wants to merge 4 commits into
Conversation
chriscoveries
force-pushed
the
captions/c1-mac-filter
branch
from
October 15, 2026 20:46
895d0b8 to
e50d716
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The en-US model was available only after
AssetInventory.reserve(locale:); a fresh process could reportsupportedbefore the active filter had reserved the locale. The initial real-speech test skipped on that status, and the filter could not use the model in its own process.Root cause
The active
SpeechSessioncheckedAssetInventory.status(forModules:)without first reserving its selected locale. Reserving en-US changes the in-process status toinstalled;assetInstallationRequest(supporting:)may then return nil because no installation request is needed.Fix
The active speech session now reserves its selected locale and releases it when recognition stops. It never requests or installs assets. A separate standalone installer contains the reserve-before-request flow and requires the explicit
--install-en-us-speech-assetsflag. The headless real-speech test now feeds the LibriVox fixture through the filter core and decodes the output queue's CEA-608 triplets.Evidence
ec54c9088; filter and fake-transcriber GREEN:6b7910d6a.e50d7167d.truefor reserve andnilfor the request; status afterward wasinstalled. The standalone installer was built and, without its opt-in flag, printed usage and exited 64. It was not invoked with the installation flag again.Compatibility & risk
No public C headers or APIs changed. The filter reserves the en-US locale only while its recognizer is active; disabling it stops recognition and releases its reservation. Asset installation remains a separate explicit action. No microphone or GUI access is used.
How this was tested
test_mac_captionsandmac-captions-install-speech-assets: passed.ctest --test-dir build/c1-xcode -C Debug -R '^test_mac_captions$' --verbose: passed both CMocka cases; the real file-fed path reported the WER and decoded text above.--install-en-us-speech-assets: exit 64 with usage text; no asset request or installation was triggered.Status
Draft; local macOS verification is complete. CI remains pending until the owner resumes it.
Thank you to the obs-rust maintainers and contributors for building this project in the open. In the American spirit of free expression and individual independence, and with the principle of judging contributions on their merit alone, this PR is a small piece of what independent people can build when they come together.