GPU steps on Modal
What it's for: the GPU step that turns a meeting recording into a transcript with speakers (WhisperX), without a local GPU. It runs on Modal, a serverless GPU service whose free Starter plan includes a monthly compute credit, and starts from GitHub Actions, so it can be run from a phone (#314).
Runs go to Colab, not here. On November 17, 2026, the owner decided that diarization runs on the owner's Colab (GPU compute decisions). Use GPU speakers on Colab. This workflow and its code are kept but not used for runs.
Set it up from a phone (about 10 minutes)
- Modal account: sign up at modal.com. The free Starter plan gives a monthly credit (larger with a payment method on file). Without a card, work stops when the credit runs out, which caps spending at zero. With a card, use past the credit is billed, so watch the dashboard or keep runs small.
- Modal token: modal.com → Settings → API tokens → New token. Copy the token ID and secret.
- GitHub secrets: repository Settings → Environments →
dev→ addMODAL_TOKEN_IDandMODAL_TOKEN_SECRET. Never paste them anywhere else. - Hugging Face token for the speaker models: signed in on huggingface.co, open
pyannote/speaker-diarization-community-1 and
accept its conditions (current WhisperX uses it; with only the older model accepted, speakers come back empty). For
older WhisperX versions, also accept speaker-diarization-3.1
and segmentation-3.0. Then make a read token with the same
account (settings/tokens). Add it as a third GitHub secret,
HF_TOKEN; each run copies it into the Modal secrethuggingface. (Or make that secret yourself in Modal → Secrets → Create new secret → Custom, keyHF_TOKEN.) - Run it: GitHub → Actions → GPU diarization on Modal → Run workflow, with the items to process.
What to give it
- A path in the Modal volume
open-navigator-audio, e.g.meetings/2026-11-03.opus. Put files there from a laptop:modal volume put open-navigator-audio <file> meetings/<file>. - Or a direct link to a media file a city publishes (not YouTube: YouTube blocks cloud servers, see
packages/scrapers/src/scrapers/youtube/BYPASS_IP_BLOCK.md).
Each run takes at most limit items (default 3), so one run can't use the month's credit.
What comes back, and what it costs
The run's artifact holds <name>.diarized.json per item (segments with start, end, speaker and text) and
usage.jsonl: one row per item with the GPU, seconds, GPU-hours and an estimated cost. The estimate is GPU time at
Modal's published rate (T4 $0.000164 a second, as reported on 2026-11-14); CPU and memory are billed on top, so the
invoice is a little higher. Modal's dashboard shows the real spend.
Not run yet: the first real run checks that the pinned WhisperX version still exposes the diarization pipeline the
code calls (llm.gemini.diarize_postprocess).
Credentials
| Credential | Where it's made | Scope | Goes to | Lifetime |
|---|---|---|---|---|
| Modal API token | modal.com → Settings → API tokens | the Modal workspace | GitHub environment dev: MODAL_TOKEN_ID, MODAL_TOKEN_SECRET | until revoked; revoke if unused |
| Hugging Face read token | huggingface.co → Settings → Access tokens | read, gated models accepted | GitHub environment dev: HF_TOKEN, copied each run into Modal secret huggingface | 90 days |