--- title: GPU steps on Modal description: Run speech-to-text and speaker separation on a Modal GPU from GitHub, within Modal's free monthly credit. --- # 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](https://github.com/getcommunityone/open-navigator/issues/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](../development/gpu-compute-decisions.md)). Use [GPU speakers on Colab](colab-gpu-diarize.md). This workflow and its code are kept but not used for runs.
Set it up from a phone (about 10 minutes) 1. **Modal account:** sign up at [modal.com](https://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. 2. **Modal token:** modal.com → **Settings** → **API tokens** → **New token**. Copy the token ID and secret. 3. **GitHub secrets:** repository **Settings** → **Environments** → `dev` → add `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET`. Never paste them anywhere else. 4. **Hugging Face token for the speaker models:** signed in on huggingface.co, open [pyannote/speaker-diarization-community-1](https://huggingface.co/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](https://huggingface.co/pyannote/speaker-diarization-3.1) and [segmentation-3.0](https://huggingface.co/pyannote/segmentation-3.0). Then make a **read** token with the same account ([settings/tokens](https://huggingface.co/settings/tokens)). Add it as a third GitHub secret, `HF_TOKEN`; each run copies it into the Modal secret `huggingface`. (Or make that secret yourself in Modal → **Secrets** → **Create new secret** → **Custom**, key `HF_TOKEN`.) 5. **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 meetings/`. - 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 `.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 |