Skip to content

Speaker detection for the Chrome extension - #5

Open
TigerWolf wants to merge 7 commits into
tirtha4:mainfrom
TigerWolf:feature/speaker_detection
Open

TigerWolf wants to merge 7 commits into
tirtha4:mainfrom
TigerWolf:feature/speaker_detection

Conversation

@TigerWolf

@TigerWolf TigerWolf commented Sep 6, 2026

Copy link
Copy Markdown

Speaker detection for the Chrome extension

Adds speaker-detection support to Granola on Linux by replacing the macOS-only native messaging host with a Linux one.

The Chrome extension (com.granola.app) needs a native messaging host to talk to the app, but Granola only registers it on macOS. This adds a JS bridge that reproduces the host's wire protocol: it relays Chrome's length-prefixed JSON to the app's /tmp/granola-meet-consent-*.sock socket and back.

What's included

  • JS bridge (meet-consent-bridge.js) + bash entry point (meet-consent-host),
    installed to resources/native/<arch>/ where the app expects them
  • Robust framing: handles 64 MiB Chrome messages, reconnects without duplicating
    messages, and falls back across both socket candidates
  • Host registration across Chromium-family browsers — native ~/.config, snap,
    and flatpak profiles, with filesystem overrides for sandboxed flatpaks
  • Smoke tests for both the encrypted database and the bridge, so the install
    verifies speaker detection works before reporting success

connect() checked only !sock, but sock is set only in the async connect
handler, so pending connects could overlap and leave multiple live sockets
with active data handlers, relaying app->Chrome traffic twice. Gate new
connections on a connecting flag and destroy loser sockets on connect.
@TigerWolf TigerWolf changed the title Add a script that adds speaker detection support in Linux Speaker detection for the Chrome extension Sep 10, 2026
Electron uses the binary name to determine app.isPackaged. The consent
host lookup path changed in app 7.529.x -- dev builds look for the host
at resources/app.asar/native/<arch>/meet-consent-host (a path inside the
asar that can never exist on disk), while packaged builds use
resources/native-host/meet-consent-host. Renaming the binary makes
Electron report isPackaged=true, restoring the correct lookup path
without touching app code.

- Rename electron to granola in the install script
- Update native/meet-consent-host to search for either name
- Update uninstall.sh kill pattern
- Update README with explanation of the rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant