Metadata-Version: 2.4
Name: meeting-helper
Version: 7.58.0
Summary: AI meeting assistant for macOS — auto-record, live transcription, Claude-powered answers
Author: Meeting Helper contributors
License: MIT
Keywords: meeting,transcription,deepgram,claude,overlay,macos
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0
Requires-Dist: anthropic<3,>=0.40.0
Requires-Dist: google-genai<4,>=1.0.0
Requires-Dist: openai<4,>=1.40.0
Requires-Dist: httpx<1,>=0.27
Requires-Dist: h2>=4.0
Requires-Dist: mcp<3,>=1.0.0
Requires-Dist: sounddevice>=0.4.6
Requires-Dist: numpy>=1.24
Requires-Dist: deepgram-sdk<4.0,>=3.0
Requires-Dist: faster-whisper>=1.0.0
Requires-Dist: imageio-ffmpeg>=0.4.9
Requires-Dist: aiohttp<4,>=3.9.0
Requires-Dist: pynput>=1.7.6
Requires-Dist: pywebview<7,>=5.0
Requires-Dist: Pillow>=10.0
Requires-Dist: certifi>=2024.0
Requires-Dist: truststore<0.11,>=0.10
Requires-Dist: keyring>=24.0
Requires-Dist: pyobjc-framework-Cocoa<14,>=10.0; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-AVFoundation<14,>=10.0; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-Quartz<14,>=10.0; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-ScreenCaptureKit<14,>=10.0; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-CoreMedia<14,>=10.0; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-libdispatch<14,>=10.0; sys_platform == "darwin"
Requires-Dist: psutil>=5.9
Requires-Dist: sqlite-vec>=0.1.6
Requires-Dist: tiktoken>=0.7
Requires-Dist: pypdf>=4.0
Requires-Dist: python-docx>=1.0
Requires-Dist: openpyxl>=3.1
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: pytest-aiohttp; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: mypy; extra == "dev"

# Meeting Helper

AI meeting assistant for macOS. Automatically detects when a meeting starts, records and transcribes in real-time, and lets you ask Claude questions about what's being discussed — using your codebase and knowledge base as context.

## Features

- **Auto-detection** — starts recording automatically when any app activates your microphone (Zoom, Meet, Teams, etc.)
- **Real-time transcription** — local Whisper (free, no API key needed) or Deepgram Nova-3 streaming
- **Invisible overlay** — native macOS window hidden from screen share via `NSWindow.setSharingType_(0)`
- **Ask Claude** — hotkey or type a question during the meeting; Claude answers using the transcript + your repos + knowledge docs
- **Per-meeting context** — select which repos and knowledge folders to load per meeting, so Claude only gets relevant context
- **Post-meeting** — full transcription + structured summary saved alongside the MP3 recording

## Requirements

- macOS 13+ (Ventura or later)
- Python 3.11+
- Microphone + Screen Recording + Accessibility permissions (prompted on first run)

---

## Installation

### Option A — pipx (recommended)

```bash
# Install pipx if you don't have it
brew install pipx && pipx ensurepath

# Install meeting-helper
pipx install meeting-helper
```

### Option B — from source

```bash
git clone <repo-url> meeting-helper
cd meeting-helper
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
```

---

## First Run Setup

### 1. Download the Whisper model

Whisper is used for local transcription (no API key needed). The model needs to be downloaded once before your first meeting:

```bash
python3 -c "from faster_whisper import WhisperModel; WhisperModel('tiny', device='cpu', compute_type='int8')"
```

This downloads ~75MB to `~/.cache/huggingface/`. It only happens once.

> **Optional — better accuracy:** Use the `small` model (~244MB) instead of `tiny`:
> ```bash
> python3 -c "from faster_whisper import WhisperModel; WhisperModel('small', device='cpu', compute_type='int8')"
> ```
> Then in `meeting-helper setup`, set the Whisper model to `small`.

### 2. Run the setup wizard

```bash
meeting-helper setup
```

You'll be prompted for:

1. **Anthropic API key** — get one at [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys)
2. **Deepgram API key** *(optional)* — get one at [console.deepgram.com](https://console.deepgram.com) for lower-latency streaming transcription. Leave blank to use local Whisper.
3. **Recordings directory** — where to save MP3s and transcripts (default: `~/meetings`)
4. **Repos** *(optional)* — paths to your code repos for Claude context
5. **Knowledge folder** *(optional)* — a folder of `.md`/`.txt` files organized by topic

### 3. Grant macOS permissions

On first run, macOS will prompt for:
- **Microphone** — to capture your voice
- **Screen Recording** — to capture system audio (meeting participants' voices)
- **Accessibility** — for global hotkeys (2×Cmd, 2×ESC)

After granting each permission, quit Meeting Helper (Cmd+Q) and open it again
if something stops working.

macOS gives these permissions to the app that started the background service.
Started from a terminal, macOS asks for "Terminal" instead of Meeting Helper.
That is why, once `Meeting Helper.app` is installed, `meeting-helper start`
(and `meeting-helper gui`) open the app, which starts the service itself. Use
`meeting-helper start --no-app` (or `MH_START_DIRECT=1`) to start it in the
terminal anyway; `start -f` (foreground) never hands off.

---

## Usage

```bash
meeting-helper start          # start the background daemon (macOS + installed app: opens the app)
meeting-helper gui            # open the main window
meeting-helper stop           # stop the daemon
meeting-helper status         # show daemon and meeting status
meeting-helper logs           # tail the daemon log
meeting-helper version        # check for updates
meeting-helper fix-recording      # recover Screen Recording without rebooting
meeting-helper diagnose-recording # dump SCK / TCC diagnostics for paste-back
```

### `fix-recording` — when system audio goes silent

On managed/corporate laptops the Screen Recording permission sometimes
silently breaks: the OS still says it's granted, but ScreenCaptureKit
stops producing samples and only mic audio is captured. Reboot is the
only known certain fix. Before rebooting, try:

```bash
meeting-helper fix-recording
```

It (1) restarts the daemon to clear any stale capture session inside our
process, then (2) optionally restarts `tccd` and `coreaudiod` (the macOS
daemons that own permission state + audio routing) — needs your sudo
password — which often un-wedges the OS-side cause without a reboot.

Flags: `--no-sudo` skips the sudo nudge; `--open-settings` opens System
Settings > Privacy & Security > Screen Recording at the end; `--regrant`
resets the capture helper's grant and triggers a fresh prompt. See
"System audio / Screen Recording permission" under Troubleshooting for the
first-time dialog and the stale entry fix.

Once the daemon is running:

1. **Start a Zoom/Meet/Teams call** → recording starts automatically
2. **Speak** → transcript appears in the overlay and GUI dashboard
3. **Ask Claude** → press `2×Cmd` (hotkey) or type in the "Ask Claude" box in the GUI
4. **End the call** → recording stops, MP3 + live transcript saved

### Hotkeys

| Combo | Action |
|---|---|
| `2× Cmd` | Trigger Claude query (uses last 5 transcript sentences) |
| `2× ESC` | Toggle overlay show/hide |
| `ESC + →` / `ESC + ←` | Scroll response down/up |
| `ESC + ]` / `ESC + [` | Navigate previous/next response |
| `Cmd + ↑` / `Cmd + ↓` | Font size up/down in overlay |

---

## Live meeting context

The Copilot answers from your knowledge base folder (Settings > Knowledge) and the live
transcript. There is no task tracker integration.

### Two-stream audio (mic vs system)

Microphone and system audio (call participants) are now transcribed into separate buffers — `self_buffer` for what you say, `other_buffer` for what others say. The TopicWorker reads only `self_buffer` so the topic is grounded in *your* speech and not contaminated by what others say. The MP3 recording still mixes both for archival.

**Required:** wear headphones during meetings. Without headphones the laptop speaker feeds the mic, the call audio gets attributed to your buffer, and the topic detection becomes unreliable.

---

## Per-Meeting Context

By default, no repos or knowledge docs are loaded into Claude's context — loading everything would dilute accuracy. Instead, use the **Context Selector** in the Dashboard during a meeting:

1. Chips show your configured repos — click to select
2. Tree shows your knowledge base folders — check what's relevant
3. Click **Load Context** — Claude now has access to only what you selected
4. Ask questions — Claude answers using that specific context

---

## Post-Meeting

Open the **Recordings** screen in the GUI to:
- Play back the MP3
- Run full transcription (faster-whisper, timestamped)
- Generate a structured summary with Claude (key points, decisions, action items)

---

## Configuration

Config is saved to `~/.config/meeting-helper/config.json`. Run `meeting-helper setup` to reconfigure.

### Whisper model quality vs speed

| Model | Size | Speed | Accuracy |
|---|---|---|---|
| `tiny` | 75MB | Fastest | Good for real-time |
| `small` | 244MB | Fast | Better accuracy |
| `base` | 142MB | Medium | Balanced |

Default is `tiny` for real-time transcription. Post-meeting transcription always uses `small` for better quality.

---

## Check for Updates

```bash
meeting-helper version
```

Checks PyPI and upgrades automatically via pipx if a newer version is available.

After a manual upgrade on macOS:

```bash
pipx upgrade meeting-helper
meeting-helper stop
```

Then quit Meeting Helper (Cmd+Q) and open it again from `~/Applications`. The
app starts a fresh background service with the new version. Do not start the
service from a terminal: macOS would then ask for Terminal instead of Meeting
Helper (Accessibility, Microphone).

---

## Desktop UI

Launch the desktop UI (it starts the daemon when none is running):

```bash
meeting-helper gui
```

A native macOS window opens (powered by pywebview) with three tabs:

- **Copilot** — the during-meeting surface. Toolbar lets you switch AI provider (Anthropic/Google) and model, change transcriber (Whisper/Deepgram), and start/stop a session. Ask Claude anything mid-meeting; the response streams in real time. Detected topics, extracted tasks, and the meeting brief surface in the right rail.
- **Library** — past meetings + notes. Click Reveal to jump to the file in Finder.
- **Settings** — API keys, AI provider order, transcription engine, hot-moment window, MCP server, menubar/autostart toggles. Changes save to disk immediately.

### Install as a Mac app

To launch from Spotlight / Launchpad / Dock instead of the terminal:

```bash
meeting-helper install-app
```

This drops a `Meeting Helper.app` bundle into `~/Applications/` and tells
Spotlight to index it. After a few seconds, ⌘+Space → "Meeting Helper"
will open the window directly (no terminal needed).

Pass `--system` to install to `/Applications/` instead (requires sudo).

### Working on the UI

The frontend lives under `web/` (Next.js 15 + shadcn/ui + Tailwind v4). For hot-reload:

```bash
# Terminal 1 (--no-app keeps the daemon in this terminal)
meeting-helper start --no-app

# Terminal 2
npm --prefix web install   # one-time
npm --prefix web run dev

# Terminal 3 — point the shell at the dev server
MH_SHELL_DEV=1 meeting-helper gui
```

Frontend tests:

```bash
npm --prefix web run test       # vitest unit
npm --prefix web run test:e2e   # playwright (requires running daemon)
```

The release script (`release.sh`) builds the production bundle automatically before publishing to PyPI.

---

## Troubleshooting

**Daemon not detecting meetings**
- Make sure Screen Recording permission is granted in System Settings → Privacy & Security
- Try `meeting-helper logs` to see what's happening

**No transcription appearing**
- If using Deepgram: check your API key with `meeting-helper status`
- If using local Whisper: ensure the model was downloaded (see First Run Setup above)
- Check `meeting-helper logs` for errors

**Overlay not visible**
- Press `2×ESC` to show/hide
- The overlay is intentionally invisible to screen share — check your physical display, not a recording

**System audio / Screen Recording permission**

System audio (the other people in the call) is captured by a small helper app,
`MeetingHelperCapture`, installed at `~/Applications/MeetingHelperCapture.app`.
It needs the Screen Recording permission. If it is not granted, recording falls
back to the older capture path and Settings > Recording shows a notice with
these steps.

- First time: macOS shows only "Open System Settings" and "Deny". Click
  "Open System Settings" and switch `MeetingHelperCapture` ON.
- Monthly renewal (macOS 15+ asks every month): click "Allow For One Month".
- Switch is ON but it is still declined, or the dialog shows up on every
  recording (a stale entry, common after an update that rebuilt the helper):
  1. Open System Settings > Privacy & Security > Screen & System Audio Recording.
  2. Select `MeetingHelperCapture` and remove it with "-".
  3. Click "+", press Cmd+Shift+G, paste `~/Applications/MeetingHelperCapture.app`, click Open.
  4. Make sure `MeetingHelperCapture` is switched ON.
  5. Restart the daemon: `meeting-helper stop`, then quit Meeting Helper (Cmd+Q) and open it again.

`meeting-helper fix-recording` prints the same steps with the exact app path.
`meeting-helper fix-recording --regrant` resets the grant, reveals the app in
Finder and triggers a fresh prompt.

**Permission denied errors**
- Go to System Settings → Privacy & Security → Microphone / Screen Recording / Accessibility
- Remove and re-add the terminal app or meeting-helper entry

### Testing without real audio

For testing the topic/query flow without a microphone (e.g. you're on a plane, or just want to script a scenario), use:

```
curl -X POST localhost:7891/debug/say -d '{"role":"self","text":"I am working on ABC-4212 — frontend contract layer."}'
sleep 6  # let TopicWorker debounce + LLM call finish
curl localhost:7891/current_topic | jq
curl -X POST localhost:7891/query -d '{"text":"what does the feature flag do?"}'
```

The `/debug/say` endpoint appends a sentence to `self_buffer` (or `other_buffer` if `"role":"other"`), which is exactly what the transcribers do for real speech. The TopicWorker, broadcasts, and `/query` handler all behave identically to the real-audio path.
