Skip to content

About

Native macOS spoken screen-mirroring chooser with offline Kokoro speech.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Headless Display

A spoken screen-mirroring chooser for a Mac with no usable screen. Written in Objective-C++, with offline Kokoro am_adam speech.

Press Control–Option–Command–M to hear the receivers macOS currently finds:

Available displays. 1. Headset. 2. Tablet. 3. Living Room TV. Press a number to connect. Zero repeats the list. Escape cancels.

The names above are examples. The actual list comes from your Mac.

  • 1–9 selects an announced device.
  • 0 rescans and repeats the list.
  • Escape cancels the chooser.
  • Control–Option–Command–D disconnects the active display and speaks confirmation. The Displays menu also has Disconnect display. iPad/native Sidecar sessions use the private API; ordinary AirPlay uses the existing Accessibility bridge.
  • Number keys are captured only while choosing. They are released on selection, cancellation, or after 30 seconds of inactivity following the announcement.
  • A Displays menu provides the chooser and an optional preferred-device action.

Requirements

  • Apple Silicon Mac, macOS 14 or later; tested on macOS 26.5.1 with an M1 Pro.
  • Xcode Command Line Tools (xcode-select --install).
  • Sidecar/AirPlay already configured for the receiving devices.
  • Accessibility permission for Headless Display to discover and select AirPlay receivers. Direct iPad Sidecar connections do not require that permission.

The app runs after login, including without a working built-in screen. It cannot operate at the FileVault unlock screen.

Download

Download Headless Display 0.1.0 for Apple Silicon, unzip it, and move Headless Display.app to Applications. The ZIP includes the offline speech runtime and model. The app is ad-hoc signed, not Developer ID signed or notarized. Checksums and dependency source archives are attached to the same release.

Build and run

git clone https://github.com/undivisible/headless-display.git
cd headless-display
./scripts/fetch-deps.sh
./scripts/build.sh
open 'build/Headless Display.app'

The dependency script fetches a pinned sherpa-onnx ARM64 runtime and Kokoro int8 model, verifies their SHA-256 hashes, and keeps them in ignored deps/. The build creates an ad-hoc-signed app containing everything needed for offline speech. No Python, model server, microphone, or account is needed at runtime.

For the complete receiver list, use Displays → Enable full device discovery, then enable the app under System Settings → Privacy & Security → Accessibility. If permission stops working after a rebuild, quit the app, remove its old Accessibility entry, add the new app bundle, and reopen it.

Start at login

After building, optionally run:

./scripts/install-login.sh

This copies the app to ~/Applications and creates a user LaunchAgent that opens it through Launch Services. It refuses to overwrite an existing installation. Quit any other copy first: only one copy should own the global hotkey.

To remove login startup, first quit the app from its Displays menu, then run:

launchctl bootout "gui/$(id -u)/io.github.undivisible.headless-display"
rm "$HOME/Library/LaunchAgents/io.github.undivisible.headless-display.plist"

How connections work

  • iPad: Apple's private SidecarCore API; CoreGraphics configures mirroring.
  • Vision Pro, Macs and TVs: native Accessibility calls into the current macOS Displays mirroring menu. Targets are looked up fresh and the app checks that a connection appears before announcing success.
  • Vision Pro uses AirPlay mirroring, not the separate curved or ultrawide Mac Virtual Display mode.

The spoken list includes up to nine receivers, ordered by device type: Vision Pro → iPads → TVs → Macs. Names sort alphabetically within each type. Classification uses Sidecar model metadata and AirPlay Bonjour TXT records, never personal device names. Receivers whose type cannot be identified appear last. Local Network access may be requested for Bonjour discovery.

Private APIs and macOS Accessibility structure can change after OS updates. Devices must be awake and discoverable. Network/account requirements remain those of Apple's Sidecar and AirPlay features.

Command line

With the app running:

bin='build/Headless Display.app/Contents/MacOS/headless-display'
"$bin" --choose
"$bin" --cancel
"$bin" --disconnect
"$bin" --devices
"$bin" --connect 'your receiver name'

--choose and --cancel notify the running menu-bar app. --devices prints the currently discoverable names. --connect requests a named receiver. Speech stays on-device; no microphone recording or speech recognition is used.

Validation

Manually verified on the development Mac: physical global hotkey, spoken numbered discovery, iPad selection, Vision Pro connection, repeated connection without disconnection, cancellation, offline Kokoro generation/playback, and bundle signature verification. Other receiver models have not been tested.

License

Original source: ISC. Downloaded dependencies retain their own licenses; see THIRD_PARTY.md.

Continuous integration and releases

GitHub Actions builds on an Apple Silicon macOS runner for pushes to main and pull requests. It checks the app signature, receiver ordering, and offline speech, then uploads a packaged app and source archives as workflow artifacts.

Pushing a v* tag uploads those assets to its GitHub release. The workflow can also be run manually with an existing release tag; it verifies that the runtime source and version match that tag before uploading. CI cannot exercise nearby physical receivers or global keyboard shortcuts.

About

Native macOS spoken screen-mirroring chooser with offline Kokoro speech.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages